CSB Ammo Packs

v1.0.0 0 pobrań Daemon666 Ostatnia aktualizacja: Jul 14, 2026

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 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_packs for shop/extra-item plugins.
  • /packs balance display and csb_givepacks admin 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

  1. Make sure the nvault module is enabled in addons/amxmodx/configs/modules.ini.
  2. Compile and copy csb_ammo_packs.amxx into addons/amxmodx/plugins/.
  3. Add it to plugins.ini, above any plugin that calls its natives.
  4. Change the map. The vault file appears in addons/amxmodx/data/vault/ on the first save.

Instalacja

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

Cvary

CVARDefaultDescription
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).

Komendy

CommandAccessDescription
say /packs Show your ammo-pack balance.
csb_givepacks g (ADMIN_LEVEL_A) csb_givepacks <name or #userid> <amount>

Lista zmian — v1.0.0

1.0.0 - Initial release.
Wersje →
Współtwórcy: Daemon666 ✦
Oryginalny autor: Zombie Plague (ammo-pack economy) Licencja: GPL-3.0

Ocena

No ratings yet.

Download v1.0.0

Compiled live from the source below — nothing pre-built.
Pobierz .sma
Pliki:
csb_ammo_packs.sma main 5.9 KB

Wymagania

AMX Mod X ≥ 1.9
Engine ReHLDS HLDS
ReGameDLL Opcjonalne
ReAPI Opcjonalne
Metamod Metamod / Metamod-r
Moduły nvault
Znane konflikty Other ammo-pack/credit plugins that register the same csb_*_packs native names will clash - run only one currency provider.
Wróć do Pluginów