GM/PlayerSpray

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m
m
 
Line 9: Line 9:
 
|type=Player
 
|type=Player
 
|name=sprayer
 
|name=sprayer
|desc=The player who sprayed.
+
|desc=The player
 
}}
 
}}
 
{{Ret
 
{{Ret

Latest revision as of 19:35, 20 February 2016

 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