Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Armor and Health Regeneration

Featured Replies

  • Administrator

Players slowly regain health and armor over time or after avoiding damage, with settings for delay, rate and caps.

Armor and Health Regeneration 1.0.0 (olds.ro)

A living player who has not been hurt for a few seconds slowly gets his health and armor back, up to set caps. Players with a chosen admin flag (VIPs) regenerate twice as fast.

  • After olds_rg_delay (5) seconds without damage, the player gets olds_rg_hp (2) health and olds_rg_ap (1) armor every second.
  • Health stops at olds_rg_maxhp (100), armor at olds_rg_maxap (100). Health or armor already above its cap is never lowered.
  • Every point of damage restarts the wait, so a player who is shot during regeneration waits the full delay again.
  • Players with the olds_rg_vip_flag admin flag ("b" by default) get twice the health and armor every second.
  • A vest keeps its helmet. Armor that reached 0 is a destroyed vest: it is refilled only with olds_rg_newarmor 1 (then as Kevlar, no helmet).
  • Regeneration stops when the player dies and starts again when he spawns. It is silent: no text and no sound.
  • Bots regenerate the same way as players.

Requirements

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

Install

  • Compile scripting/olds_regen.sma and copy olds_regen.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/plugins/olds_regen.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_regen.amxx to addons/amxmodx/configs/plugins.ini.

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

  olds_rg_hp 2             health given every second (0 = no health)
  olds_rg_ap 1             armor given every second (0 = no armor)
  olds_rg_delay 5          seconds without damage before it starts
  olds_rg_maxhp 100        health is never raised above this
  olds_rg_maxap 100        armor is never raised above this
  olds_rg_vip_flag "b"     admin flag(s) that double the rate; with several
                           letters a player needs all of them; "" = nobody
  olds_rg_newarmor 0       1 = a player without armor gets a vest from the
                           regeneration; 0 = only armor he still has is
                           refilled

Commands None.

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-0082. 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_regen.sma, test/lib0082_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-0082).

Armor and Health Regeneration
v1.0Counter-Strike 1.6PluginNot tested yet
AMX Mod X 1.10Server engine ReHLDSNeeds ReAPI YesMetamod Metamod-R0 downloads4.4 KBUpdated 11 hours ago
Sign in to download
Pawn (AMX Mod X) · 206 lines
/*
 * Armor and Health Regeneration (olds.ro workshop card LIB-0082)
 *
 * A living player who has not been hurt for a few seconds slowly gets his
 * health and armor back, up to set caps. Players with a chosen admin flag
 * (VIPs) regenerate twice as fast.
 *
Show all 206 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.