Garry's Mod Wiki

WEAPON:Deploy

  boolean WEAPON:Deploy()
This hook is predicted. This means that in singleplayer, it will not be called in the Client realm.

Description

Called when player has just switched to this weapon.

Due to this hook being predicted, it is not called clientside in singleplayer at all, and in multiplayer it will not be called clientside if the weapon is switched with Player:SelectWeapon or the "use" console command, however it will be called clientside with the default weapon selection menu and when using CUserCmd:SelectWeapon

Returns

1 boolean
Return true to allow switching away from this weapon using lastinv command