Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case DIALOG_LOGIN2:
- {
- if ( !response ) return Kick( playerid );
- if ( response )
- {
- if ( strlen( inputtext ) == 0 )
- return ShowPlayerDialog( playerid, DIALOG_LOGIN2, DIALOG_STYLE_INPUT, "{FFFFFF}Password", ""COL_RED"Error!\n\
- {FFFFFF}Please write your current password.",
- "Login", "Kick");
- new
- PlayerFile[ 13 + MAX_PLAYER_NAME ],
- Password[ 20 + 1 ]
- ;
- format( PlayerFile , sizeof PlayerFile, "Accounts/%s.ini", Encode( pName( playerid ) ) );
- INI_ParseFile( PlayerFile, "ParsePlayerPass", false, true, playerid );
- GetPVarString( playerid, "pPass", Password, sizeof Password );
- if ( !strcmp ( inputtext, Password, false ) )
- {
- new
- sTitle[ 21 + MAX_PLAYER_NAME + 25 ],
- sBoxInfo[ 512 ],
- Pdata[ 8 + 15 ]
- ;
- SetPVarInt( playerid, "Logged", 1 );
- format( PlayerFile , sizeof PlayerFile, "Accounts/%s.ini", Encode( pName( playerid ) ) );
- INI_ParseFile( PlayerFile, "LoadUser", false, true, playerid, true, false );
- GetPVarString( playerid, "Date", Pdata, 8 + 10 );
- if ( GetPVarInt( playerid, "CGod" ) == 1 )
- {
- SetPVarInt( playerid, "CGod", 1);
- CGod[ playerid ] = SetTimerEx( "CarGodTimer", 200, true, "i", playerid );
- }
- if ( GetPVarInt( playerid, "God" ) == 1 )
- {
- SetPVarInt( playerid, "God", 1);
- God[ playerid ] = SetTimerEx( "GodTimer", 200, true, "i", playerid );
- }
- format( sTitle, sizeof sTitle, "{FFFFFF}Welcome back, "COL_LIGHTBLUE"%s{FFFFFF}!", pName( playerid ) );
- if ( GetPVarInt( playerid, "Level" ) == 0 )
- {
- format( sBoxInfo, sizeof sBoxInfo, "{FFFFFF}These are your stats:\n\n\
- {FFFFFF}Rank: "COL_LIGHTBLUE"%s\n\
- {FFFFFF}VIP Level: "COL_LIGHTBLUE"%d\n\
- {FFFFFF}Score: "COL_LIGHTBLUE"%d\n\
- {FFFFFF}Registered on: "COL_LIGHTBLUE"%s\n\n\
- {FFFFFF}To view more stats please type to "COL_LIGHTBLUE"/stats\n\
- {FFFFFF}Type "COL_LIGHTBLUE"/mycmds{FFFFFF} to view your current commands.",
- GetPlayerLevelName( playerid ),
- GetPlayerVLevel( playerid ),
- GetPVarInt( playerid, "Score" ),
- Pdata );
- }
- if ( GetPVarInt( playerid, "Level" ) > 1 )
- {
- format( sBoxInfo, sizeof sBoxInfo, "{FFFFFF}These are your stats:\n\n\
- {FFFFFF}Level: "COL_LIGHTBLUE"%s\n\
- {FFFFFF}VIP Level: "COL_LIGHTBLUE"%d\n\
- {FFFFFF}Score: "COL_LIGHTBLUE"%d\n\
- {FFFFFF}Registered on: "COL_LIGHTBLUE"%s\n\n",
- GetPlayerLevelName( playerid ),
- GetPlayerVLevel( playerid ),
- GetPVarInt( playerid, "Score" ),
- Pdata );
- format( sBoxInfo, sizeof sBoxInfo, "%s{FFFFFF}To view more stats please type to "COL_LIGHTBLUE"/stats\n\
- {FFFFFF}Type "COL_LIGHTBLUE"/mycmds{FFFFFF} to view your current commands.\n\
- "COL_RED"Admin note:{FFFFFF}Use "COL_LIGHTBLUE"/acmds {FFFFFF}and "COL_LIGHTBLUE"/arules {FFFFFF}for commands and Admin rules.",sBoxInfo);
- }
- ShowPlayerDialog(playerid, DIALOG_LOG_DONE, DIALOG_STYLE_MSGBOX, sTitle, sBoxInfo, "Ok", "");
- }else{ ShowPlayerDialog(playerid, DIALOG_LOGIN2, DIALOG_STYLE_INPUT, ""COL_RED"Wrong password...", ""COL_RED"Wrong password!\n{FFFFFF}Please try again.", "Login", "Kick");
- }
- }
- }
- }
- //Here is the problem:
- if ( !strcmp ( inputtext, Password, false ) ) //if they wont write bad password
- .........
- }else{ //if he write bad password
- ShowPlayerDialog...
- //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