Quote:
Originally Posted by Rajat_Pawar
Are you sure you're doing everything correctly? Something like the following:
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; }
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!
|
No worries now man, I just didn't set the variable to 0 when the player connects
got it working now, thanks anyway man