Type Weapon
Weapon
Methods
| clip1() | Returns the weapon's primary ammo capacity. |
| clip2() | Returns the weapon's secondary ammo capacity. |
| getActivity() | Returns the current animation the weapon is playing. |
| getHoldType() | Returns the weapon's hold type. |
| getMaxClip1() | Returns the weapon's maximum primary ammo size. |
| getMaxClip2() | Returns the weapon's maximum secondary ammo size. |
| getPrimaryAmmoType() | Returns the weapon's primary ammo type. |
| getPrintName() | Returns a "nice" name for the weapon. |
| getSecondaryAmmoType() | Returns the weapon's secondary ammo type. |
| getSlot() | Returns the slot the weapon lives in. |
| getSlotPos() | Returns the weapon's slot position. |
| isCarriedByLocalPlayer() | Returns whether the weapon is being carried by the local player. |
| isScripted() | Returns true if the weapon is a SWEP (scripted weapon). |
| isWeaponVisible() | Returns true if the weapon is visible. |
Methods
- Weapon:clip1()
-
Returns the weapon's primary ammo capacity.
Environment:
SharedReturn value:
(number)The amount of ammo in the weapon's primary clip. - Weapon:clip2()
-
Returns the weapon's secondary ammo capacity.
Environment:
SharedReturn value:
(number)The amount of ammo in the weapon's secondary clip. - Weapon:getActivity()
-
Returns the current animation the weapon is playing.
Environment:
SharedReturn value:
(number)ACT_ enum. - Weapon:getHoldType()
-
Returns the weapon's hold type.
Environment:
SharedReturn value:
(string)Hold type. - Weapon:getMaxClip1()
-
Returns the weapon's maximum primary ammo size.
Environment:
SharedReturn value:
(number)The maximum amount of ammo the weapon's primary clip can hold. - Weapon:getMaxClip2()
-
Returns the weapon's maximum secondary ammo size.
Environment:
SharedReturn value:
(number)The maximum amount of ammo the weapon's secondary clip can hold. - Weapon:getPrimaryAmmoType()
-
Returns the weapon's primary ammo type.
Environment:
SharedReturn value:
(number | string)The weapon's primary ammo type, either a number or a string. - Weapon:getPrintName()
-
Returns a "nice" name for the weapon.
Environment:
SharedReturn value:
(string)The weapon's "nice" name. - Weapon:getSecondaryAmmoType()
-
Returns the weapon's secondary ammo type.
Environment:
SharedReturn value:
(number | string)The weapon's secondary ammo type, either a number or a string. - Weapon:getSlot()
-
Returns the slot the weapon lives in.
Environment:
SharedReturn value:
(number)The weapon's slot. - Weapon:getSlotPos()
-
Returns the weapon's slot position.
Environment:
SharedReturn value:
(number)The weapon's slot position. - Weapon:isCarriedByLocalPlayer()
-
Returns whether the weapon is being carried by the local player.
Environment:
ClientReturn value:
(boolean)True if the weapon is being carried by the local client player. - Weapon:isScripted()
-
Returns true if the weapon is a SWEP (scripted weapon).
Environment:
SharedReturn value:
(boolean)True if it's a SWEP, false otherwise. - Weapon:isWeaponVisible()
-
Returns true if the weapon is visible.
Environment:
SharedReturn value:
(boolean)True if the weapon does not have the nodraw flag.