Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Teammate Grenade Damage Off

Featured Replies

  • Administrator

Removes HE grenade damage to teammates and to the thrower while ordinary gunfire friendly fire stays active.

Teammate Grenade Damage Off 1.0.0 (olds.ro)

HE grenades stop hurting the thrower's teammates and the thrower, while the rest of friendly fire (bullets, knife) keeps working. Enemies take the full blast as usual, and a kill made by the grenade is credited as usual.

Requirements

  • ReHLDS, ReGameDLL_CS, Metamod-R, ReAPI
  • AMX Mod X 1.10 or newer (written and tested on 1.10.0.5490)
  • mp_friendlyfire 1 on the server. With mp_friendlyfire 0 the game already spares teammates from HE grenades, and only olds_henofd_self has an effect.

Install

  • Compile scripting/olds_he_nofriendly.sma and copy olds_he_nofriendly.amxx to addons/amxmodx/plugins/. The compiler needs ReAPI's include files (reapi.inc and the reapi_*.inc files from the ReAPI release) next to the stock AMX Mod X includes.
  • Copy data/lang/olds_he_nofriendly.txt to addons/amxmodx/data/lang/.
  • Copy configs/plugins/olds_he_nofriendly.cfg to addons/amxmodx/configs/plugins/ (if it is missing, the plugin writes it with the default values).
  • Add olds_he_nofriendly.amxx to addons/amxmodx/configs/plugins.ini.

How it works

  • Every hit a player takes passes the ReAPI hook RG_CBasePlayer_TakeDamage first. HE grenade damage (DMG_GRENADE) from the player's own grenade, or from a grenade thrown by a teammate, is stopped there; anything else goes through unchanged.
  • A teammate is a player on the team the grenade was thrown for (the thrower's team at the moment of the throw), the same rule the game uses for HE friendly fire. It stays right when the thrower changes team or leaves the server before the grenade goes off.
  • In free-for-all (ReGameDLL's mp_freeforall 1) nobody is a teammate, so only the self rule applies.
  • Counter-Strike itself never pushes a living player with a blast. With olds_henofd_knock 1 the plugin pushes a spared player away from the blast with the strength the damage would have had (the Half-Life blast push formula from the game code: about 5 units per second for each point of damage, at most 1000).

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

  olds_henofd_self 1    1 = a player's own HE grenade does not hurt them
  olds_henofd_team 1    1 = an HE grenade does not hurt the thrower's teammates
  olds_henofd_knock 0   1 = a spared player is still pushed away from the blast

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, with bots and real HE grenades: thrower and teammates unharmed, enemies hurt and killed (frag to the thrower), rifle friendly fire still working, the push with olds_henofd_knock 1, each cvar switched off, a thrower who changed team or left the server.

No sounds, models or sprites are added.

Credits and licence Written from scratch by alexit (olds.ro workshop) for workshop card LIB-2266. Licence: GNU GPL version 3 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_he_nofriendly.sma

License: GPL-3.0-or-later.
Written for the olds.ro plugin workshop (LIB-2266), by alexit, reviewed by alexit and checked by the automated Claude review.

Teammate Grenade Damage Off
v1.0.0Counter-Strike 1.6PluginTests passed
AMX Mod X 1.10Server engine ReHLDSNeeds ReAPI YesMetamod Metamod-R0 downloads5.3 KBUpdated 12 hours ago
Sign in to download
Pawn (AMX Mod X) · 225 lines
/*
 * Teammate Grenade Damage Off (olds.ro workshop card LIB-2266)
 *
 * HE grenades stop hurting the thrower's teammates and the thrower, while
 * ordinary friendly fire (bullets, knife) keeps working. Enemies take the
 * full blast as usual, and a kill made by the grenade is credited as usual.
 *
Show all 225 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.