Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Ammo Status Alerts

Featured Replies

  • Administrator

Short on-screen texts warn when a magazine is low, when to reload, and when the player is completely out of ammo.

Ammo Status Alerts 1.0.0 (olds.ro)

Short texts under the crosshair warn when the magazine is low, when it is empty and the player should reload, and when the weapon is out of ammo altogether. Each player can switch them off and on with /ammotext.

  • "Low ammo": the magazine holds olds_as_low (20) percent of a full one or less (AK-47: 6 of 30). It is shown once, not on every shot; again only after a reload or with another weapon.
  • "Reload": the magazine is empty and there is ammo left. It stays until the reload starts.
  • "No ammo": the magazine and the reserve are both empty. It stays until the player gets ammo or switches weapons.
  • With olds_as_flash 1, "Reload" and "No ammo" blink; with 0 they stay steady.
  • The knife, grenades and the C4 never show a text, nor does a dead player. Switching weapons shows the state of the new weapon.
  • The texts are director HUD texts, which cannot be cleared. So "Reload" and "No ammo" are drawn again every 0.5 s with a short life and are gone at most 0.5 s after the reason; "Low ammo" lives 1 s.
  • /ammotext is remembered until the player leaves the server.

Requirements

  • ReHLDS, ReGameDLL_CS, Metamod-r, ReAPI
  • AMX Mod X 1.10.0.5490 or newer

Install

  • Compile scripting/olds_ammoalerts.sma and copy olds_ammoalerts.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 data/lang/olds_ammoalerts.txt to addons/amxmodx/data/lang/.
  • Copy configs/plugins/olds_ammoalerts.cfg to addons/amxmodx/configs/plugins/ and change the values you want. (If the file is missing, the plugin writes one with the defaults the first time it starts.)
  • Add olds_ammoalerts.amxx to addons/amxmodx/configs/plugins.ini.

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

  olds_as_low 20           "Low ammo" at this percent of a full magazine or
                           less (1-99)
  olds_as_flash 1          1 = "Reload" and "No ammo" blink; 0 = steady

Commands

  say /ammotext, say_team /ammotext   switch the texts off or on for
                                      yourself

Texts "Low ammo", "Reload", "No ammo", and the /ammotext chat line. They are in data/lang/olds_ammoalerts.txt and can be translated there.

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-0076. 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_ammoalerts.sma, test/lib0076_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-0076).

Ammo Status Alerts
v1.0Counter-Strike 1.6PluginNot tested yet
AMX Mod X 1.10Server engine ReHLDSNeeds ReAPI YesMetamod Metamod-R0 downloads5.2 KBUpdated 11 hours ago
Sign in to download
Pawn (AMX Mod X) · 286 lines
/*
 * Ammo Status Alerts (olds.ro workshop card LIB-0076)
 *
 * Short texts under the crosshair warn when the magazine is low, when it is
 * empty and the player should reload, and when the weapon is out of ammo
 * altogether. Each player can switch them off and on with /ammotext.
 *
Show all 286 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.