Variable issue - Switch(variable
#2

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!
Reply


Messages In This Thread
Variable issue - Switch(variable - by ross8839 - 04.02.2014, 04:49
Re: Variable issue - Switch(variable - by RajatPawar - 04.02.2014, 05:00
Re: Variable issue - Switch(variable - by ross8839 - 04.02.2014, 05:05

Forum Jump:


Users browsing this thread: 1 Guest(s)