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: 44ms

DB GetPage 4
Generate Html 5
SaveChanges (1) 20
Render Body 0
Render Sidebar 13