11.05.2015, 00:09
PHP код:
if(udb_hash(inputtext) == PlayerInfo[playerid][Password])// THIS HASHES THE PASSWORD, BE SURE TO HAVE WHIRLPOOL
{
GivePlayerMoney(playerid, PlayerInfo[playerid][Money]); // GIVES MONEY
SpawnPlayer(playerid); // SPAWNS PLAYER
}
else
{
ShowLoginDialog(playerid); // RESHOWS YOUR DIALOG, CHANGE IF NEEDED
SendClientMessage(playerid, GREY, "[SERVER]: You have entered an incorrect password."); // SAYS INCORRECT PW
LoginAttempt[playerid] ++; //ADDS A LOGIN ATTEMPT
if(LoginAttempt[playerid] == 2) // TO MANY AND HE'S KICKED
{
LoginAttempt[playerid] = 0;
Kick(playerid);
}
}