Gamemode.PlayerSpray

From GMod Wiki

Revision as of 15:01, 10 June 2011 by Wizard (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NamePlayerSpray
SyntaxGM:PlayerSpray( Player Player )
DescriptionCalled when a player sprays
ReturnsBoolean true to block the spray, false to allow it.
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.PlayerSpray]Gamemode.PlayerSpray [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionOnly admins can spray.
Used onNewerServer.png
Code
function GM:PlayerSpray(ply)
	return !ply:IsAdmin()
end
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox