Weapon.SetWeaponHoldType

From GMod Wiki

Jump to: navigation, search
Function
Syntax Weapon.SetWeaponHoldType( String )
Description:
Positions the third person player model's hands according to the weapon hold type.
Returns: nil
In Object: Weapon
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Weapon.SetWeaponHoldType]Weapon.SetWeaponHoldType [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Example

DescriptionSets the weapon hold type.
Used onNewerShared.png
Code
 
SWEP.HoldType = "ar2"
function SWEP:Initialize()
	self:SetWeaponHoldType( self.HoldType )
end
 
OutputSets the weapon hold type to the swep's hold type variable.


Additional Notes

normal No weapon stance, hands at sides
melee Hand raised above head, used for crowbar
melee2 Two-handed sword
fist Hands up punching hold type
knife Bent over stabbing hold type
smg Used for two-handed weapons such as the SMG1
ar2 Used for two-handed weapons such as the AR2
pistol Two hand grasp used for pistols
rpg Used for weapons that rest on your shoulder
physgun Used for the gravity/physics guns
grenade Used for items that you throw
shotgun Used for weapons such as shotguns
crossbow Used for crossbows and sniper rifles
slam Used for stuff you hold away from your face
passive Sort of an "idle" stance, like when the civil protection hold their smg's when they aren't aiming
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox