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.ammounder theammovalue.

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.luafile and locate the weapon you want to edit.Change the weapon’s
ammotypevalue to the desired type. By default, available types include:AMMO_STUNGUNAMMO_PISTOLAMMO_SMGAMMO_SHOTGUNAMMO_RIFLEAMMO_SNIPERAMMO_MG
To add a custom ammunition type, edit the
configAmmo.luafile and extend theconfig.ammoconfiguration.The
ammoTypedefined inconfigAmmo.luamust match theammoTypevalue specified inweapons.lua.

Last updated