Garry's Mod Wiki

Weapon:SetHoldType

void 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: 25ms

Session 0
DB GetPage 5
Generate Html 1
SaveChanges 9
Render Body 0
Render Sidebar 7