GM/PlayerBindPress

From Garry's Mod
Revision as of 09:43, 8 November 2013 by Robotboy655 (Talk | contribs)
Jump to: navigation, search
 GM:PlayerBindPress( )

Contents

Description

Runs when a bind has been pressed. Allows to block commands.

Arguments

Player ply

The player who used the command

Arguments

string bind

The bind command

Arguments

boolean pressed

If the bind was activated or deactivated

Examples

Example

Prevents players from using flashlight.

function GM:PlayerBindPress( ply, bind, pressed )
	--To block more commands, you could add another line similar to
	--the one below, just replace the command
	if ( string.find( bind, "impulse 100" ) ) then return true end
end


Personal tools
Navigation