Player/GetViewModel

From Garry's Mod
Jump to: navigation, search
 Player:GetViewModel( )

Description

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.

NOTE

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

Arguments

number index=0

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

Returns

Entity

The view model entity
Personal tools
Navigation