From Garry's Mod
Runs when a bind has been pressed. Allows to block commands.
|NOTE||By using the "alias" console command, this hook can be effectively circumvented|
|NOTE||To stop the user from using +attack, +left and any other movement commands of the sort, please look into using GM:StartCommand instead|
The bind command
If the bind was activated or deactivated
Return true to prevent the bind
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