Garry's Mod Wiki

Revision Difference

player_manager.AddValidHands#548723

<function name="AddValidHands" parent="player_manager" type="libraryfunc"> <description>Assigns view model hands to player model.</description> <realm>Shared</realm> <file line="27-L34">lua/includes/modules/player_manager.lua</file> <args> <arg name="name" type="string">Player model name</arg> <arg name="model" type="string">Hands model</arg> <arg name="skin" type="number">Skin to apply to the hands</arg> <arg name="bodygroups" type="string">Bodygroups to apply to the hands</arg>⤶ <arg name="skin" type="number" default="0">Skin to apply to the hands</arg> <arg name="bodygroups" type="string" default="0000000">Bodygroups to apply to the hands. See <page>Entity:SetBodyGroups</page> for help with the format.</arg>⤶ <arg name="matchBodySkin" type="boolean" default="false">If set to `true`, the skin of the hands will be set to the skin of the playermodel. ⤶ This is useful when player models have multiple user-selectable skins.</arg>⤶ </args> </function> <example> <description>Adds CS:S hands for hostage playermodels</description> <code> player_manager.AddValidHands( "hostage01", "models/weapons/c_arms_cstrike.mdl", 0, "10000000" ) player_manager.AddValidHands( "hostage02", "models/weapons/c_arms_cstrike.mdl", 0, "10000000" ) player_manager.AddValidHands( "hostage03", "models/weapons/c_arms_cstrike.mdl", 0, "10000000" ) player_manager.AddValidHands( "hostage04", "models/weapons/c_arms_cstrike.mdl", 0, "10000000" ) </code> </example>