09.04.2015, 11:49
PHP код:
case DIALOG_LOGIN:
{
if(!response) return Kick(playerid);
if(response)
{
if(udb_hash(inputtext) != PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
SendClientMessage(playerid, 0xFF7F2480,"You have successfully logged in your game account!");
SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
LoggedIn[playerid] = true;
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Account","Welcome to SA-MP Server!\n\n{FF1493}Your account is registered on the server, we hope you enjoy your stay!\n{FF1493}In order to log in your account successfully, Fill in your password correctly:\n\n{FF0033}*Password you typed is incorrect","Continue","Leave");
LoggedIn[playerid] = false;
}
}
}