PLAYER:GetHandsModel

From Garry's Mod
Jump to: navigation, search
 PLAYER:GetHandsModel( )

Contents

Description

Called on player spawn to determine which hand model to use

Returns

table

A table containing info about view model hands model to be set. See examples.

Examples

Example

Default action of player_default class

function PLAYER:GetHandsModel()

	-- return { model = "models/weapons/c_arms_cstrike.mdl", skin = 1, body = "0100000" }

	local playermodel = player_manager.TranslateToPlayerModelName( self.Player:GetModel() )
	return player_manager.TranslatePlayerHands( playermodel )

end

Output:

View model hands model is chosen according to players player model.
Personal tools
Navigation