Gamemode.PlayerSpray

From GMod Wiki

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