04.02.2014, 05:00
Are you sure you're doing everything correctly? Something like the following:
Also, a tip - reuse the variable, certainly MAX_PLAYERS amount of players connecting at a single time is nearly impossible, so, probably 15 - 20 players at a time, so just re-use it!
pawn Код:
new wrongAttempts[MAX_PLAYERS char] = {0, ...};
public OnDialogResponse(..)
{
if( ! isPasswordcorrect() )
{
switch( wrongAttempts{ playerid } )
{
case 0: First attempt;
case 1: Second attempt;
case 2: Third attempt; Kick();
default: {}
}
wrongAttempts{playerid}++;
ShowPlayerLoginDialog(..);
}
return 1;
}