01.09.2011, 10:39
pawn Code:
for (new i = 0; i < MAX_PLAYERS; i++)
pawn Code:
for(new i; i != MAX_PLAYERS; i++)
for (new i = 0; i < MAX_PLAYERS; i++)
for(new i; i != MAX_PLAYERS; i++)
public OnGameModeExit()
{
for(new i; i != MAX_PLAYERS; i++) OnPlayerDisconnect(i, 1);
db_close(Database);
return 1;
}
the PlayerInfo[playerid][pAdminLevel] is a global variable, it wont get erased in case a level 3 admin logs out. so adding the level=0 into the disconnect, is a good idea.
to set admin level to 0 when connecting, is not the best idea (its value is set to 0 at initializing, also got set to 0 from a recently playing admin on that slot). i suggest you to use PVars to store such "important" variables, so any of your filterscript can access it aswell. PVars gets deleted when a player disconnects, so no worry about resetting the player-arrays. |
pawn Code:
|