19.08.2011, 21:22
Hey guys. I'm using Linux CentOS 5.6 and when 4/5 players join my server, my OnGameModeInit runs multiple times. Any ides what might cause this?
public OnPlayerConnect(playerid) { OnGameModeInit(); }
new bool:OGM=false;
public OnGameModeInit()
{
if(OGM == true) return; //if it equals true, it has already been called and should not continue past this line
OGM = true; //If the above if statement was false, this and the code below it will be executed - making "OGM" true, will cause the if statement above to become true, and thus, the OnGameModeInit callback will not be called again.
}