Garry's Mod Wiki

Garry's Mod Wiki

  boolean GM:PreDrawViewModel( Entity vm, Player ply, Weapon weapon, number flags )

Description

Called before the view model has been drawn.

By default this hook also calls WEAPON:PreDrawViewModel, so you can use that if developing a scripted weapon.

See GM:PostDrawViewModel for a hook that runs immediately after rendering a view model.
See GM:PreDrawViewModels for a hook that runs before all view models are drawn within a frame.

For view model hands, see GM:PreDrawPlayerHands.

This is a rendering hook which provides a 3d rendering context.

Arguments

1 Entity vm
This is the view model entity before it is drawn. On server-side, this entity is the predicted view model.
2 Player ply
The owner of the view model.
3 Weapon weapon
This is the weapon that is from the view model.
4 number flags
The STUDIO_ flags for this render operation.

Returns

1 boolean
Return true to prevent the default view model rendering. This also affects GM:PostDrawViewModel.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...