07.08.2015, 00:56
Players never actually disconnect when you gmx. The disconnect callback is called so players stats and script stuff is not lost in the process because gmx is not actually a restart command. Gmx is "gamemode exit," it exits the current gamemode and advances to the next in the list of gamemodes in your server.cfg file. If you only have gamemode 0, then it will exit and init the one gamemode you have. This is why all players are actually connected in OnGameModeInit, thus you can detect gmx and prevent RemoveBuildingForPlayer crashes.