04.09.2012, 18:45
Try like this
pawn Код:
case DIALOG_LOGIN:
{
if (!response ) return Kick ( playerid );
if( response )
{
new hashPassword[129];
WP_Hash(hashPassword,sizeof(hashPassword),inputtext);
if(!strcmp(hashPassword, PlayerInfo[playerid][Password]))
{
format(uFile, 35, USER_FILE, GetName(playerid));
INI_ParseFile(uFile, "LoadUser_user", .bExtra = true, .extra = playerid);
SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
SetPVarInt(playerid, "Logged", 1);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
return 1;
}
}
}