13.08.2012, 15:26
pawn Код:
if(dialogid == dlogin)
{
if(!response) return Kick(playerid);
if(response)
{
new hashpass[129];
WP_Hash(hashpass,sizeof(hashpass),inputtext);
if(strcmp(hashpass,PlayerInfo[playerid][Ppassword]))
{
SetPlayerScore(playerid,PlayerInfo[playerid][Pscore]);
GivePlayerMoney(playerid,PlayerInfo[playerid][Pmoney]);
SendClientMessage(playerid,-1,"Welcome back! You have successfully logged in");
}
else if(!strcmp(hashpass,PlayerInfo[playerid][Ppassword]))
{
ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_PASSWORD,"Login","Welcome back. This account is registered. \nInsert your password to login to your account.\nIncorrect password!","Login","Quit");//We will tell to them that they've entered an incorrect password
return 1;
}
}
}
Please no one ask why im making it dini becuase yini faster etc etc i find dini better