An nVault-backed ammo-pack currency: earn packs for kills, headshots and round wins, persisted by SteamID, with natives so a shop plugin can spend them. /packs shows the balance.
| csb_ammo_packs.sma main | fb58f71 | 5.9 KB |
CSB Ammo Packs is the currency layer a zombie or boss server needs before it can have a shop. Players earn ammo packs for kills, headshots and round wins; balances are persisted per SteamID in nVault, so they survive reconnects and map changes.
Other plugins spend and grant packs through three natives — csb_get_packs(id), csb_set_packs(id, amount) and csb_add_packs(id, amount) — so an extra-items menu or VIP shop can be built on top without touching this plugin's storage. /packs shows your balance and admins can grant packs with csb_givepacks.
Inspired by the ammo-pack economy of Zombie Plague. This is an independent GPL re-implementation; no original code is reused.
Features
- Earn packs for kills (
csb_packs_kill), headshots (csb_packs_headshot) and round wins (csb_packs_roundwin). - Starting balance for new SteamIDs (
csb_packs_start) and an optional cap (csb_packs_max). - Persisted per SteamID in nVault; loaded on connect, saved on change and on disconnect.
- Natives
csb_get_packs/csb_set_packs/csb_add_packsfor shop/extra-item plugins. /packsbalance display andcsb_givepacksadmin grant.
Using the natives
In another plugin you can declare the natives yourself, for example:
native csb_get_packs(id); native csb_set_packs(id, amount); native csb_add_packs(id, amount);
Then check csb_get_packs(id) before an item purchase and call csb_set_packs(id, balance - price) to charge for it.
Installation
- Make sure the
nvaultmodule is enabled inaddons/amxmodx/configs/modules.ini. - Compile and copy
csb_ammo_packs.amxxintoaddons/amxmodx/plugins/. - Add it to
plugins.ini, above any plugin that calls its natives. - Change the map. The vault file appears in
addons/amxmodx/data/vault/on the first save.
1. Enable the nvault module in addons/amxmodx/configs/modules.ini 2. Put csb_ammo_packs.amxx in addons/amxmodx/plugins/ 3. Add it to plugins.ini ABOVE any shop plugin that uses its natives 4. Change map
| CVAR | Default | Description |
|---|---|---|
csb_packs_start |
5 |
Ammo packs a brand-new SteamID starts with. |
csb_packs_kill |
1 |
Packs awarded for a kill. |
csb_packs_headshot |
1 |
Extra packs for a headshot kill. |
csb_packs_roundwin |
2 |
Packs awarded to alive players on the winning team. |
csb_packs_max |
1000000 |
Maximum packs a player may hold (0 = no cap). |
| Command | Access | Description |
|---|---|---|
say /packs |
|
Show your ammo-pack balance. |
csb_givepacks |
g (ADMIN_LEVEL_A) |
csb_givepacks <name or #userid> <amount> |
1.0.0 - Initial release.Versionen →
No ratings yet.
| AMX Mod X | ≥ 1.9 |
| Engine | ReHLDS HLDS |
| ReGameDLL | Optional |
| ReAPI | Optional |
| Metamod | Metamod / Metamod-r |
| Module | nvault |
| Bekannte Konflikte | Other ammo-pack/credit plugins that register the same csb_*_packs native names will clash - run only one currency provider. |









