Ok, now this seems like a stupid question that should have a simple answer, but doesn’t seem to be the case.
Why can i not seem to gather any data at all on the players that are connecting?
If it says “connecting” or “spawning”, player.GetAll() does not return them as a player.
Now, although this does make sense given that the player is not yet a valid entity, i should still be able to get a list of steamids that are connecting to my server.
Question is, How?
The problem specifically occurs between map restarts.
How am i supposed to maintain a list of players after the server initializes but before the players run :InitialSpawn()?
And before anyone says use GM:PlayerConnect or GM:PlayerAuthed or GM:CheckPassword, please put the following debug code on a server, join the server, then do a map restart with changelevel gm_construct.
Notice that NONE of the auth functions are called for players that maintain their connection through the restart until their :InitialSpawn is called, so what am i supposed to do?
Now then, before anyone tells me to go the long way round and do some sort of, record the connected player data into a text file and use that after the restart.
Not only does this sound like a very hacky way to go about this, it also isn’t very reliable.
If a player disconnects between the restart beginning and until their next GM:PlayerAuth hook call, the GM:PlayerDisconnected will NOT be called for the player.
So it’s like not only do i NOT have a list of players, i also can’t tell who is and is not connecting.
Like, it seems odd to me that this data is not available using lua.