Garry's Mod Wiki


  Entity Player:GetViewModel( number index = 0 )


Returns the player's view model entity by the index. Each player has 3 view models by default, but only the first one is used.

To use the other viewmodels in your SWEP, see Entity:SetWeaponModel.

In the Client realm, other players' viewmodels are not available unless they are being spectated.


1 number index = 0
optional index of the view model to return, can range from 0 to 2


1 Entity
The view model entity