Login screen attempt tries
#2

Код:
new gAttempts[MAX_PLAYERS]; // A global array to store how many attempts the player has had

// When the player enters his password
// CHECK IF IT WAS INCORRECT
{
    gAttempts[playerid]++; // Adds 1 to the attempts count
    If (gAttempts[playerid] == 3) return Kick(playerid); // If the attempts equal 3, it kicks
    ShowPlayerDialog(Your incorrect dialog here)
}
Don't forget to reset gAttempts[playerid] (set it to 0) when the player connects or disconnects.
Reply


Messages In This Thread
Login screen attempt tries - by Johny32 - 24.05.2016, 19:51
Re: Login screen attempt tries - by Stinged - 24.05.2016, 19:54
Re: Login screen attempt tries - by oMa37 - 24.05.2016, 19:56
Re: Login screen attempt tries - by Johny32 - 24.05.2016, 20:21

Forum Jump:


Users browsing this thread: 2 Guest(s)