Can't edit a variable for disconnected players
#2

No because if you use 1 as the default value for offline players, you won't ever be able to ban ID 1 from the server.

What you could do, though, is make it -1 or something. Obviously -1 == INVALID_PLAYER_ID but then you could do something like this:

pawn Code:
if(playername == INVALID_PLAYER_ID)
{
    // check if the account name is online
        // if not, check if the account name exists
            // if it does, set the 'banned variable' to banned
}
Reply


Messages In This Thread
Can't edit a variable for disconnected players - by Saw® - 09.02.2013, 22:07
Re: Can't edit a variable for disconnected players - by Scenario - 09.02.2013, 22:26

Forum Jump:


Users browsing this thread: 1 Guest(s)