Weapon

From GMod Wiki

Jump to: navigation, search

Weapon is the object of the... weapon a player or npc is holding.

It can be accessed through self in a swep script, or by ply:GetActiveWeapon().

The Weapon object is a child of Entity.

Object Methods

NewerShared.png Weapon:CallOnClient
NewerShared.png Weapon:Clip1
NewerShared.png Weapon:Clip2
NewerShared.png Weapon:DefaultReload
NewerShared.png Weapon:GetActivity
NewerShared.png Weapon:GetNextPrimaryFire
NewerShared.png Weapon:GetNextSecondaryFire
NewerShared.png Weapon:GetPrimaryAmmoType
NewerShared.png Weapon:GetSecondaryAmmoType
NewerShared.png Weapon:IsNPC
NewerShared.png Weapon:IsPlayer
NewerShared.png Weapon:IsVehicle
NewerShared.png Weapon:IsWeapon
NewerShared.png Weapon:IsWeaponVisible
NewerShared.png Weapon:LastShootTime
NewerShared.png Weapon:SendWeaponAnim
NewerShared.png Weapon:SetClip1
NewerShared.png Weapon:SetClip2
NewerShared.png Weapon:SetNextPrimaryFire
NewerShared.png Weapon:SetNextSecondaryFire
NewerShared.png Weapon:SetWeaponHoldType
NewerClient.png Weapon.GetPrintName
NewerClient.png Weapon.IsCarriedByLocalPlayer

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox