Does these two loops do the same thing?
#6

Quote:
Originally Posted by Cowboy
View Post
pawn Code:
public OnGameModeExit()
{
    for(new i; i != MAX_PLAYERS; i++) OnPlayerDisconnect(i, 1);
    db_close(Database);
    return 1;
}
Why would there be anything like that at all is what I'm wondering. OnPlayerDisconnect is called for every player upon a controlled server restart anyways.
Quote:
Originally Posted by Cowboy
View Post
I gotta another question.

Example:

PlayerInfo[playerid][pAdminLevel] = 0;

Where is it best to put this? OnPlayerConnect or OnPlayerDisconnect? Or maybe both?
Both would be a waste. Resetting it under OnPlayerDisconnect is a good idea.
Reply


Messages In This Thread
Does these two loops do the same thing? - by Cowboy - 01.09.2011, 10:39
Re: Does these two loops do the same thing? - by Lorenc_ - 01.09.2011, 10:41
Re: Does these two loops do the same thing? - by Cowboy - 01.09.2011, 10:46
Re: Does these two loops do the same thing? - by Babul - 01.09.2011, 11:16
Re: Does these two loops do the same thing? - by =WoR=Varth - 01.09.2011, 11:28
Re: Does these two loops do the same thing? - by AndreT - 01.09.2011, 11:46
Re: Does these two loops do the same thing? - by =WoR=Varth - 01.09.2011, 11:56
Re: Does these two loops do the same thing? - by Cowboy - 01.09.2011, 11:58
Re: Does these two loops do the same thing? - by =WoR=Varth - 01.09.2011, 12:08
Re: Does these two loops do the same thing? - by Cowboy - 01.09.2011, 12:17

Forum Jump:


Users browsing this thread: 5 Guest(s)