Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Backpack Ammo Limits

Featured Replies

  • Administrator

Admins set the maximum reserve ammo for each weapon type through a config file.

Backpack Ammo Limits 1.0.0 (olds.ro)

Admins set the most reserve (backpack) ammo each weapon may carry, in a config file. Ammo bought or picked up above the limit is not kept.

  • One line per weapon in addons/amxmodx/configs/olds_bpammo.ini, for example "weapon_ak47 120" or "weapon_awp 15". Weapons not listed keep the game's normal maximum.
  • Buying ammo at the limit is refused, so no money is spent. Ammo picked up above the limit (from the floor or a dropped gun) is thrown away.
  • Weapons that share an ammo type (for example the AK-47 and the Scout) share one reserve; when a player carries more than one of them, the smallest limit counts.
  • Grenades count too: "weapon_flashbang 1" lets a player carry one flash.
  • A line that is not "weapon_<name> <0-255>" is skipped and the AMX Mod X log names its line number.
  • amx_bpammo_reload reads the file again; the new limits apply to ammo given from then on and at each player's next spawn.
  • The plugin shows no text in the game and has no language file.

Requirements

  • ReHLDS, ReGameDLL_CS, Metamod-r, ReAPI
  • AMX Mod X 1.10.0.5490 or newer, with the cstrike module (enabled by default)

Install

  • Compile scripting/olds_bpammo.sma and copy olds_bpammo.amxx to addons/amxmodx/plugins/. The compiler needs ReAPI's include files (reapi.inc and the reapi_*.inc files from the ReAPI release, in addons/amxmodx/scripting/include/) next to the stock AMX Mod X includes.
  • Copy configs/olds_bpammo.ini to addons/amxmodx/configs/ and remove the ; in front of the limits you want (all examples are off at first).
  • Copy configs/plugins/olds_bpammo.cfg to addons/amxmodx/configs/plugins/ and change the value if you want. (If the file is missing, the plugin writes one with the defaults the first time it starts.)
  • Add olds_bpammo.amxx to addons/amxmodx/configs/plugins.ini.

Settings (addons/amxmodx/configs/plugins/olds_bpammo.cfg)

  olds_ba_enforce 1        1 = the limits apply; 0 = the plugin does nothing

Limits file (addons/amxmodx/configs/olds_bpammo.ini)

  weapon_<name> <0-255>    one weapon per line; empty lines and lines
                           starting with ; # or // are skipped

Commands

  amx_bpammo_reload        (ADMIN_CFG) reads olds_bpammo.ini again and
                           prints how many limits it read

Log L 12/05/2026 - 20:00:00: [olds_bpammo.amxx] olds_bpammo.ini line 4 skipped: "weapon_bogus 10" is not "weapon_<name> <0-255>" for a weapon with ammo. L 12/05/2026 - 20:00:00: [olds_bpammo.amxx] olds_bpammo.ini: 2 backpack ammo limit(s) read.

How it works When the game gives ammo (ReAPI RG_CBasePlayer_GiveAmmo), its own maximum for that ammo is lowered to the limit, so the game itself stops there. Buying ammo at the limit (RG_BuyGunAmmo) is refused. At spawn and when a weapon is added, a reserve above the limit is cut with cs_set_user_bpammo.

Tested on ReHLDS 3.15.0.896, ReGameDLL_CS 5.30.0.814, Metamod-r 1.3.0.149, AMX Mod X 1.10.0-git5490, ReAPI 5.29.0.358.

Credits and licence Written from scratch by alexit (olds.ro workshop) for workshop card LIB-0097. Licence: GNU General Public License v3.0 or later (GPL-3.0-or-later).

Install

Download the ZIP above and copy its folders into cstrike/. Compile the .sma in addons/amxmodx/scripting with the AMX Mod X 1.10 compiler, put the .amxx in addons/amxmodx/plugins, and add it to plugins.ini.

Files: addons/amxmodx/scripting/olds_bpammo.sma, test/lib0097_probe.sma

Idea: olds.ro workshop library · Plugin: alexit · Tested automatically (compiled on AMX Mod X 1.8.2, 1.9 and 1.10, played on a CS 1.6 test server)
License: GPL-3.0-or-later. Written for the olds.ro plugin workshop (LIB-0097).

Backpack Ammo Limits
v1.0Counter-Strike 1.6PluginNot tested yet
AMX Mod X 1.10Server engine ReHLDSNeeds ReAPI YesMetamod Metamod-R0 downloads5.7 KBUpdated 10 hours ago
Sign in to download
Pawn (AMX Mod X) · 282 lines
/*
 * Backpack Ammo Limits (olds.ro workshop card LIB-0097)
 *
 * Admins set the most reserve (backpack) ammo each weapon may carry, in a
 * config file. Ammo bought or picked up above the limit is not kept.
 *
 * File: addons/amxmodx/configs/olds_bpammo.ini, one weapon per line:
Show all 282 lines

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.