Garry's Mod Wiki

Revision Difference

WEAPON:Deploy#552909

<cat>hook</cat> <function name="Deploy" parent="WEAPON" type="hook"> <ishook>yes</ishook>⤶ <description> Called when player has just switched to this weapon. <note>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 <page>Player:SelectWeapon</page> or the "use" console command, however it will be called clientside with the default weapon selection menu and when using <page>CUserCmd:SelectWeapon</page></note> </description> <realm>Shared</realm> <predicted>Yes</predicted> <hidepredictionwarning>Disable automatic prediction warning</hidepredictionwarning>⤶ <rets> <ret name="" type="boolean">Return true to allow switching away from this weapon using lastinv command</ret> </rets> </function>