From Garry's Mod
Revision as of 16:04, 1 March 2013 by Facepunch bot
Called when the player spawns for the first time.
The player who spawned.
Prints the name of the player joining.
function GM:PlayerInitialSpawn(ply) print( ply:GetName().." joined the server.\n" ) end -- That way you are overriding the default hook -- you can use hook.Add to make more functions get called when this event occurs local function spawn(ply) print( ply:GetName().." joined the game.\n") end hook.Add( "PlayerInitialSpawn", "some_unique_name", spawn )
<somebody> joined the game