Ammo System
Ammunition system
The resource provides two different ammunition systems by default:
Configured-ammo system. When the player uses an ammo item, a preset amount of ammunition is added to the weapon. The quantity added is determined in the configuration table
config.ammo
under theammo
value.

Per-item-as-one-ammo system. Each ammo item counts as one single round. For example, if the player has five ammo items and presses the reload key (R), five rounds are loaded into the weapon. If the number of rounds exceeds the magazine capacity, only enough rounds to fill the magazine are loaded.
How to Change a Weapon’s Ammunition Type
To modify or add ammunition types for weapons, follow these steps:
Open the
items/weapon.lua
file and locate the weapon you want to edit.Change the weapon’s
ammotype
value to the desired type. By default, available types include:AMMO_STUNGUN
AMMO_PISTOL
AMMO_SMG
AMMO_SHOTGUN
AMMO_RIFLE
AMMO_SNIPER
AMMO_MG
To add a custom ammunition type, edit the
configAmmo.lua
file and extend theconfig.ammo
configuration.The
ammoType
defined inconfigAmmo.lua
must match theammoType
value specified inweapons.lua
.
Last updated