Garry's Mod Wiki

Revision Difference

WEAPON:PreDrawViewModel#565353

<function name="PreDrawViewModel" parent="WEAPON" type="hook"> <description>Allows you to modify viewmodel while the weapon in use before it is drawn. This hook only works if you haven't overridden <page>GM:PreDrawViewModel</page>.</description> <realm>Client</realm> <args> <arg name="vm" type="Entity">This is the view model entity before it is drawn.</arg> <arg name="weapon" type="Weapon">This is the weapon that is from the view model.</arg> <arg name="ply" type="Player">The the owner of the view model.</arg> </args> <rets>⤶ <ret name="" type="boolean">Return `true` to prevent the default action of rendering the view model. `PostDrawViewModel` will NOT be called in this scenario.</ret>⤶ </rets>⤶ </function>