Garry's Mod Wiki

Weapon:SetHoldType

Weapon:SetHoldType( string name )

Description

Sets the hold type of the weapon. This function also calls WEAPON:SetWeaponHoldType and properly networks it to all clients.

This only works on scripted weapons.
Using this function on weapons held by bots will not network holdtype changes to clients if the world model is set to an empty string (SWEP.WorldModel = "").

Arguments

1 string name
Name of the hold type. You can find all default hold types here

Example

Puts a players hands down by its sides on reload.

function SWEP:Reload() self:SetHoldType( "normal" ) end

Page Links


Special Pages


Wikis

?

Render Time: 140ms

DB GetPage 24
Generate Html 2
SaveChanges (1) 100
Render Body 0
Render Sidebar 12