GM:PlayerSpray

From Garry's Mod
Jump to: navigation, search
 GM:PlayerSpray( )

Contents

Description

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

Arguments

Player sprayer

The player

Returns

boolean

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

Examples

Example

Makes so that only Admins can spray.

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


Personal tools
Navigation