Garry's Mod Wiki

Garry's Mod Wiki

  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 )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...