Author Topic: Plese help  (Read 3947 times)

0 Members and 1 Guest are viewing this topic.

Offline Erik

  • Street Thug
  • *
  • Posts: 17
    • View Profile
Plese help
« on: April 05, 2014, 10:16:35 am »
I need a good and working  login and register system...
Plses help.
Thanks

Offline dynavolt71

  • Crime Boss
  • ****
  • Posts: 371
    • View Profile
    • My Blog
Re: Plese help
« Reply #1 on: April 05, 2014, 01:33:11 pm »
Use GUPS.
[PAWNO]Fix Error " Failed to set data for "" " - http://forum.vicecitymultiplayer.com/index.php?topic=5743.0



:'(

Offline Erik

  • Street Thug
  • *
  • Posts: 17
    • View Profile
Re: Plese help
« Reply #2 on: April 05, 2014, 02:42:29 pm »
pawn:
[pawn]C:\Documents and Settings\erik\Asztal\VC-MP server\gamemodes\Test.pwn(301) : error 017: undefined symbol "IsPlayerRegistered"
C:\Documents and Settings\erik\Asztal\VC-MP server\gamemodes\Test.pwn(306) : error 017: undefined symbol "IsValidNick"
C:\Documents and Settings\erik\Asztal\VC-MP server\gamemodes\Test.pwn(313) : error 017: undefined symbol "file"
C:\Documents and Settings\erik\Asztal\VC-MP server\gamemodes\Test.pwn(313) : error 017: undefined symbol "file"
C:\Documents and Settings\erik\Asztal\VC-MP server\gamemodes\Test.pwn(313) : error 029: invalid expression, assumed zero
C:\Documents and Settings\erik\Asztal\VC-MP server\gamemodes\Test.pwn(313) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.0.3367         Copyright (c) 1997-2005, ITB CompuPhase


6 Errors.
[/pawn]

code:
Code: [Select]
C:\Documents and Settings\erik\Asztal\VC-MP server\gamemodes\Test.pwn(301) : error 017: undefined symbol "IsPlayerRegistered"
C:\Documents and Settings\erik\Asztal\VC-MP server\gamemodes\Test.pwn(306) : error 017: undefined symbol "IsValidNick"
C:\Documents and Settings\erik\Asztal\VC-MP server\gamemodes\Test.pwn(313) : error 017: undefined symbol "file"
C:\Documents and Settings\erik\Asztal\VC-MP server\gamemodes\Test.pwn(313) : error 017: undefined symbol "file"
C:\Documents and Settings\erik\Asztal\VC-MP server\gamemodes\Test.pwn(313) : error 029: invalid expression, assumed zero
C:\Documents and Settings\erik\Asztal\VC-MP server\gamemodes\Test.pwn(313) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.0.3367 Copyright (c) 1997-2005, ITB CompuPhase


6 Errors.

How to fix errors?



Offline dynavolt71

  • Crime Boss
  • ****
  • Posts: 371
    • View Profile
    • My Blog
Re: Plese help
« Reply #3 on: April 05, 2014, 05:38:37 pm »
Just try a Fresh GUPS and its should worked
[PAWNO]Fix Error " Failed to set data for "" " - http://forum.vicecitymultiplayer.com/index.php?topic=5743.0



:'(

Offline Erik

  • Street Thug
  • *
  • Posts: 17
    • View Profile
Re: Plese help
« Reply #4 on: April 05, 2014, 07:09:35 pm »
Code: [Select]
C:\Documents and Settings\erik\Asztal\VC-MP Server\gamemodes\Test.pwn(154) : error 017: undefined symbol "IsPlayerRegistered"
C:\Documents and Settings\erik\Asztal\VC-MP Server\gamemodes\Test.pwn(159) : error 017: undefined symbol "IsValidNick"
C:\Documents and Settings\erik\Asztal\VC-MP Server\gamemodes\Test.pwn(166) : error 017: undefined symbol "file"
C:\Documents and Settings\erik\Asztal\VC-MP Server\gamemodes\Test.pwn(166) : error 017: undefined symbol "file"
C:\Documents and Settings\erik\Asztal\VC-MP Server\gamemodes\Test.pwn(166) : error 029: invalid expression, assumed zero
C:\Documents and Settings\erik\Asztal\VC-MP Server\gamemodes\Test.pwn(166) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.0.3367 Copyright (c) 1997-2005, ITB CompuPhase


6 Errors.

same errors

Offline rathore

  • Street Thug
  • *
  • Posts: 42
  • I am a scripter and still trying to be best
    • View Profile
    • Ultimate gamier
Re: Plese help
« Reply #5 on: April 08, 2014, 12:44:03 pm »
Replace this login

[pawn]else if ( strcmp( cmd, "login", true ) == 0 )
   {
      tmp = strtok( cmdtext, idx );
       if ( !strlen( tmp ) ) return SendClientMessage( playerid, COLOR_GREEN, "Usage: /login [Password]" );
       if ( IsRegistered( playerid ) ) return SendClientMessage( playerid, COLOR_RED, "Error: Your nick-name is not registered." );
       if ( IsLoggedIn( playerid ) ) return SendClientMessage( playerid, COLOR_RED, "Error: You have already logged-in." );

       new pass_confirm[ 256 ];
       pass_confirm = dini_Get( file, "Password" );

       if ( strcmp( encrypt( tmp ), pass_confirm, true ) == 0 )
      {
          format( file, sizeof( file ), USERS_FILE, gPlayers[ playerid ] );
         new level, stats, nogoto, noloc, cash, szMsg[ 128 ], IP[ 24 ];
         level = dini_Int( file, "Level" );
         stats = dini_Int( file, "Stats" );
         nogoto = dini_Int( file, "NoGoto" );
         noloc = dini_Int( file, "NoLoc" );
         cash = dini_Int( file, "Cash" );

         GetPlayerIp( playerid, IP, 24 );

         PlayerInfo[ playerid ][ Logged ] = 1;
         PlayerInfo[ playerid ][ Level ] = level;
         PlayerInfo[ playerid ][ Stats ] = stats;
         PlayerInfo[ playerid ][ NoGoto ] = nogoto;
         PlayerInfo[ playerid ][ NoLoc ] = noloc;

         UpDateFile( USERS_FILE, gPlayers[ playerid ], "Login", "1" );
         UpDateFile( USERS_FILE, gPlayers[ playerid ], "Ip", IP );
         
         SendClientMessage( playerid, COLOR_GREEN, "You have logged-in sucessfully." );
         format( szMsg, sizeof( szMsg ), "Nick:[ %s ] Level:[ %d ] Status:[ %s ]", gPlayers[ playerid ], level, StatusTag( level ) );
         SendClientMessage( playerid, COLOR_BLUE, "Do not spam flood, Hacks, Abused" );
         SendClientMessage( playerid, COLOR_BLUE, "See Hackers, Cheaters report to admin !report [nick/id] [reason]" );
         SendClientMessage( playerid, COLOR_GREEN, szMsg );
         SetPlayerMoney( playerid, cash );
      }
      else
      {
          PlayerInfo[ playerid ][ FalseLogins ]++;
          if ( PlayerInfo[ playerid ][ FalseLogins ] >= LOGIN_ATTEMPTS )
         {
              format(str, sizeof( str ), "%s has been kicked. Reason:[ Invalid Login Attempts ]", gPlayers[ playerid ] );
              SendClientMessageToAll( COLOR_RED, str );
              PlayerInfo[ playerid ][ FalseLogins ] = 0;
              Kick( playerid );
         }
         else
         {
             SendClientMessage( playerid, COLOR_RED, "Error: Incorrect password." );
         }
      }
       return 1;
   }[/pawn]


REGISTER

[pawn]if ( strcmp( cmd, "register", true ) == 0 )
   {
      tmp = strtok( cmdtext, idx );
       if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "Usage: /c register [Password]" );
      else if ( IsPlayerRegistered( gPlayers[ playerid ] ) )
      {
         format( str, sizeof( str ), "Error: %s is already a registered nick.", gPlayers[ playerid ] );
         SendClientMessage( playerid, COLOR_RED, str );
      }
      else if( IsValidNick ( gPlayers[ playerid ] ) )
      {
         format( str, sizeof( str ), "Error: Your nick-name containes illegal characters. Please remove them." );
         SendClientMessage( playerid, COLOR_RED, str );
      }
       else
      {
         format( file, sizeof( file ), USERS_FILE, gPlayers[ playerid ] );
          new string[ 24 ], IP[ 24 ], szMsg[ 128 ];
         GetPlayerIp( playerid, IP, 24 );
         format( string, 24, "%s", IP );
         dini_Create( file );
         dini_Set( file, "Password", encrypt( tmp ) );
         dini_Set( file, "Login", "1" );
         dini_Set( file, "Bank", "0" );
         dini_Set( file, "Cash", "0" );
         dini_Set( file, "Level", "1" );
         dini_Set( file, "Stats", "1" );
         dini_Set( file, "Ip", string );
         SendClientMessage( playerid, COLOR_GREEN, "You have registered successfully." );
         
         format( szMsg, sizeof( szMsg ), "Dont Forget Your Password:[ %s ]", tmp );
         SendClientMessage( playerid, COLOR_BLUE, "Do not spam flood, Hacks, Abused" );
         SendClientMessage( playerid, COLOR_BLUE, "See Hackers, Cheaters report to admin !report [nick/id] [reason]" );
         SendClientMessage( playerid, COLOR_GREEN, szMsg );

         PlayerInfo[ playerid ][ Logged ] = 1;
         PlayerInfo[ playerid ][ Level ] = 1;
         PlayerInfo[ playerid ][ Stats ] = 1;
      }
      return 1;
   }[/pawn]


Use this pawno

http://www.4shared.com/zip/pC2m6UvOce/VCMP_-_Pawno_By_MUZAMMIL_SADIQ.html