Garry's Mod Wiki

GM:PlayerSpray

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 not ply:IsAdmin() end )

Special Pages


Wikis

?

Render Time: 21ms

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