Several of my scripts set different variables when a player joins a game. For this thread I'll use my subadmin script as an example.
When a player joins the game, he/she/it goes through OnJoinGame and OnJoinTeam. During this time the script checks the player's IP via a list of IP's in a static array. If it matches, then it sets their status as 1 for that ID = it is a subadmin. OnLeaveGame, it sets it back to 0 for that ID=not subadmin anymore.
When I placed the subadmin check IP script in OnJoinGame, it NEVER worked the first time a subadmin would join because it never set the "I am a subadmin" flag = 1. I know because I would have it print out the entire array of flags. The player would have to disconnect, reconnect and then only sometimes it would set the flag.
I got better luck when I placed the script in OnJoinTeam. This seemed to work about 80-95% of the time. My subadmins would rarely have to disconnect and reconnect again.
Any idea why this is anyone?