10.04.2017, 10:56
I did it like this and it's only show first password is incorrect and there is no dialog return for other and i can spawn myself!
Код:
if(GetPVarInt(playerid, "FailedLoginAttempt") == 0) { SetPVarInt(playerid, "FailedLoginAttempt", 1); SendClientMessage(playerid, -1, "SERVER: The password you have entered is incorrect (1/3 attempts used)."); ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", string1, "Login", "Cancel"); } else if(GetPVarInt(playerid, "FailedLoginAttempt") == 1) { SetPVarInt(playerid, "FailedLoginAttempt", 2); SendClientMessage(playerid, -1, "SERVER: The password you have entered is incorrect (2/3 attempts used)."); ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", string1, "Login", "Cancel"); } else if(GetPVarInt(playerid, "FailedLoginAttempt") == 2) { SetPVarInt(playerid, "FailedLoginAttempt", 3); SendClientMessage(playerid, -1, "SERVER: The password you have entered is incorrect (3/3 attempts used)."); ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", string1, "Login", "Cancel"); } else if(GetPVarInt(playerid, "FailedLoginAttempt") == 3) { DeletePVar(playerid, "FailedLoginAttempt"); SendClientMessage(playerid, -1, "SERVER: You have used up all your login attempts, and hence got kicked."); Kick(playerid); }