Gamemode.PlayerInitialSpawn

From GMod Wiki

Revision as of 15:17, 17 February 2011 by BlackVoid (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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