Advertisement
Guest User

Problem with bad pass

a guest
Apr 24th, 2011
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.26 KB | None | 0 0
  1. case DIALOG_LOGIN2:
  2.         {
  3.             if ( !response ) return Kick( playerid );
  4.             if ( response )
  5.             {
  6.                 if ( strlen( inputtext ) == 0 )
  7.                     return ShowPlayerDialog( playerid, DIALOG_LOGIN2, DIALOG_STYLE_INPUT, "{FFFFFF}Password",   ""COL_RED"Error!\n\
  8.                                                                                                                 {FFFFFF}Please write your current password.",
  9.                                                                                                                 "Login", "Kick");
  10.  
  11.                 new
  12.                     PlayerFile[ 13 + MAX_PLAYER_NAME ],
  13.                     Password[ 20 + 1 ]
  14.                 ;
  15.                 format( PlayerFile , sizeof PlayerFile, "Accounts/%s.ini", Encode( pName( playerid ) ) );
  16.                 INI_ParseFile( PlayerFile, "ParsePlayerPass", false, true, playerid );
  17.                 GetPVarString( playerid, "pPass", Password, sizeof Password );
  18.  
  19.                 if ( !strcmp ( inputtext, Password, false ) )
  20.                 {
  21.                     new
  22.                         sTitle[ 21 + MAX_PLAYER_NAME + 25 ],
  23.                         sBoxInfo[ 512 ],
  24.                         Pdata[ 8 + 15 ]
  25.                     ;
  26.  
  27.                     SetPVarInt( playerid, "Logged", 1 );
  28.                     format( PlayerFile , sizeof PlayerFile, "Accounts/%s.ini", Encode( pName( playerid ) ) );
  29.                     INI_ParseFile( PlayerFile, "LoadUser", false, true, playerid, true, false );
  30.                     GetPVarString( playerid, "Date", Pdata, 8 + 10 );
  31.  
  32.  
  33.                     if ( GetPVarInt( playerid, "CGod" ) == 1 )
  34.                     {
  35.                         SetPVarInt( playerid, "CGod", 1);
  36.                         CGod[ playerid ] = SetTimerEx( "CarGodTimer", 200, true, "i", playerid );
  37.                     }
  38.                     if ( GetPVarInt( playerid, "God" ) == 1 )
  39.                     {
  40.                         SetPVarInt( playerid, "God", 1);
  41.                         God[ playerid ] = SetTimerEx( "GodTimer", 200, true, "i", playerid );
  42.                     }
  43.                     format( sTitle, sizeof sTitle, "{FFFFFF}Welcome back, "COL_LIGHTBLUE"%s{FFFFFF}!", pName( playerid ) );
  44.                     if ( GetPVarInt( playerid, "Level" ) == 0 )
  45.                     {
  46.                     format( sBoxInfo, sizeof sBoxInfo, "{FFFFFF}These are your stats:\n\n\
  47.                                                         {FFFFFF}Rank: "COL_LIGHTBLUE"%s\n\
  48.                                                         {FFFFFF}VIP Level: "COL_LIGHTBLUE"%d\n\
  49.                                                         {FFFFFF}Score: "COL_LIGHTBLUE"%d\n\
  50.                                                         {FFFFFF}Registered on: "COL_LIGHTBLUE"%s\n\n\
  51.                                                         {FFFFFF}To view more stats please type to "COL_LIGHTBLUE"/stats\n\
  52.                                                         {FFFFFF}Type "COL_LIGHTBLUE"/mycmds{FFFFFF} to view your current commands.",
  53.                                                                                                    GetPlayerLevelName( playerid ),
  54.                                                                                                    GetPlayerVLevel( playerid ),
  55.                                                                                                    GetPVarInt( playerid, "Score" ),
  56.                                                                                                    Pdata );
  57.                     }
  58.                     if ( GetPVarInt( playerid, "Level" ) > 1 )
  59.                     {
  60.                     format( sBoxInfo, sizeof sBoxInfo, "{FFFFFF}These are your stats:\n\n\
  61.                                                         {FFFFFF}Level: "COL_LIGHTBLUE"%s\n\
  62.                                                         {FFFFFF}VIP Level: "COL_LIGHTBLUE"%d\n\
  63.                                                         {FFFFFF}Score: "COL_LIGHTBLUE"%d\n\
  64.                                                         {FFFFFF}Registered on: "COL_LIGHTBLUE"%s\n\n",
  65.                                                                                                    GetPlayerLevelName( playerid ),
  66.                                                                                                    GetPlayerVLevel( playerid ),
  67.                                                                                                    GetPVarInt( playerid, "Score" ),
  68.                                                                                                    Pdata );
  69.  
  70.                     format( sBoxInfo, sizeof sBoxInfo,  "%s{FFFFFF}To view more stats please type to "COL_LIGHTBLUE"/stats\n\
  71.                                                         {FFFFFF}Type "COL_LIGHTBLUE"/mycmds{FFFFFF} to view your current commands.\n\
  72.                                                         "COL_RED"Admin note:{FFFFFF}Use "COL_LIGHTBLUE"/acmds {FFFFFF}and "COL_LIGHTBLUE"/arules {FFFFFF}for commands and Admin rules.",sBoxInfo);
  73.                     }
  74.                     ShowPlayerDialog(playerid, DIALOG_LOG_DONE, DIALOG_STYLE_MSGBOX, sTitle, sBoxInfo, "Ok", "");
  75.                     }else{ ShowPlayerDialog(playerid, DIALOG_LOGIN2, DIALOG_STYLE_INPUT, ""COL_RED"Wrong password...", ""COL_RED"Wrong password!\n{FFFFFF}Please try again.", "Login", "Kick");
  76.                 }
  77.             }
  78.         }
  79.     }
  80.  
  81.  
  82.  
  83. //Here is the problem:
  84. if ( !strcmp ( inputtext, Password, false ) ) //if they wont write bad password
  85. .........
  86. }else{ //if he write bad password
  87. ShowPlayerDialog...
  88.  
  89. //but the dialog wont show, instead of that show the dialog with his/her stats and it log //her/him in... PLEASE HELP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement