Weapon Entity
List of all functions that I know about the weapon entity

Mods

Function
Type
Description
GetMods()
​array<​string​>
Returns all mods on the weapon.
AddMod(string mod)
void
Adds a mod to the weapon.
SetMods(array<​string​> mod)
void
Sets all the mods for the weapon.
RemoveMod(string mod)
void
Removes a mod from the weapon.
Giving magazines with any of these functions will not automatically reload the weapon, to do that please use the mod array in Player#GiveWeapon()

Weapon State

Function
Type
Description
IsReloading()
bool
Returns whether or not the weapon is in a reloading state.
IsWeaponInAds()
bool
Returns whether or not the weapon is being Aimed down sight.
GetWeaponPrimaryClipCount()
int
Returns the amount of ammo currently in the weapon.
GetWeaponPrimaryClipCountMax()
int
Returns the max amount of ammo that the weapon can hold.
GetWeaponAmmoPoolType()
int
Returns type of ammo the weapon can take.

Other

Function
Type
Description
GetWeaponOwner()
entity
Returns the entity that has the weapon.

Ammo Types

Ammo Type
Identifier
Light Ammo
0
Energy Ammo
1
Heavy Ammo
2
Shotgun Ammo
3
Legendary Weapon Ammo (None)
0
Last modified 11mo ago