GM:PlayerInitialSpawn
Description
Called when the player spawns for the first time.
See GM:PlayerSpawn for a hook called every player spawn.
This hook is called before the player has fully loaded, when the player is still in seeing the
Starting Lua
screen. For example, trying to use the Entity:GetModel function will return the default model (models/player.mdl
).Due to the above note, sending net messages to the spawned player in this hook are highly unreliable, and they most likely won't be received (more information here: https://github.com/Facepunch/garrysmod-requests/issues/718).
If you look for a highly reliable way to send early net messages to a player on connection, consider using player_activate or OnRequestFullUpdate game events.
Arguments
Example
Prints the name of the player joining.
Output: Player1 joined the game.