09.04.2015, 11:42
Hello, I'm scripting for another server now I get some codes from my main gamemode but there is a problem in it
And I tried it like this
And in the both times it gives me wrong password in the first time then work in the second I o't kow why ?!
PHP код:
case DIALOG_LOGIN:
{
if(!response) return Kick(playerid);
if(response)
{
if(udb_hash(inputtext) != PlayerInfo[playerid][pPass])
{
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;
}
else
{
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;
}
}
}
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;
}
}
}