Gamemode.PlayerSpawn

From GMod Wiki

Revision as of 18:51, 10 May 2011 by Jampot (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NamePlayerSpawn
SyntaxGM:PlayerSpawn( Player Player )
DescriptionCalled whenever a player respawns.
ReturnsNil
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.PlayerSpawn]Gamemode.PlayerSpawn [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionPrints a message when the player spawns
Used onNewerServer.png
Code
function GM:PlayerSpawn( ply )
 
	print( "The player \"" .. ply:GetName() .. "\" has respawned." )
 
end
OutputThe player "<PlayerName>" has respawned.


See Also

Hook.Add


Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox