Gamemode.PlayerInitialSpawn

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NamePlayerInitialSpawn
SyntaxGM:PlayerInitialSpawn( Player Player )
DescriptionIs called when the player first spawns into the world.
ReturnsNil
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.PlayerInitialSpawn]Gamemode.PlayerInitialSpawn [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionPrints "Welcome to the server!" to a players chat when he spawns for the first time.
Used onNewerServer.png
Code
function FirstSpawn( ply )
 
	ply:PrintMessage(HUD_PRINTCENTER,"Welcome to the server!")
 
end
 
hook.Add( "PlayerInitialSpawn", "playerInitialSpawn", FirstSpawn )
OutputN/A


Additional Notes

See Also


Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox