Garry's Mod Wiki

GM:PlayerSpray

boolean GM:PlayerSpray( Player sprayer )

Description

Determines if the player can spray using the "impulse 201" console command.

Arguments

1 Player sprayer
The player

Returns

1 boolean
Return false to allow spraying, return true to prevent spraying.

Example

Makes so that only Admins can spray.

hook.Add( "PlayerSpray", "DisablePlayerSpray", function( ply ) return !ply:IsAdmin() end )

Page Links


Special Pages


Wikis

?

Render Time: 23ms

DB GetPage 3
Generate Html 3
SaveChanges (1) 8
Render Body 0
Render Sidebar 6