Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Headshot Frag Value

Featured Replies

  • Administrator

Sets how many frags a headshot kill is worth compared with a normal kill, for servers that want to reward aim.

Headshot Frag Value 1.0.0 (olds.ro)

A headshot kill on an enemy is worth more frags: on top of the normal frag the killer gets olds_hsf_extra extra frags (default 1, so a headshot counts as 2 frags). The scoreboard updates at once.

Requirements

  • ReHLDS, ReGameDLL_CS, Metamod-R, ReAPI
  • AMX Mod X 1.10 or newer (written for 1.10.0.5490)

Install

  • Compile scripting/olds_hsfrag.sma and copy olds_hsfrag.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_hsfrag.txt to addons/amxmodx/data/lang/.
  • Copy configs/plugins/olds_hsfrag.cfg to addons/amxmodx/configs/plugins/ (if it is missing, the plugin writes it with the default values).
  • Add olds_hsfrag.amxx to addons/amxmodx/configs/plugins.ini.

How it works

  • After a kill (ReAPI hook RG_CBasePlayer_Killed, post) the plugin checks the victim's m_bHeadshotKilled flag. For a headshot on an enemy it adds olds_hsf_extra frags with set_user_frags and sends the ScoreInfo message, so every scoreboard shows the new total.
  • Team kills (the stock penalty stays unchanged), suicides, kills by the world and grenade or bomb kills never give extra frags.
  • Knife headshots count only with olds_hsf_knife 1.
  • With olds_hsf_notify 1 the killer reads "Headshot: +1 extra frag." in chat.

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

  olds_hsf_extra  1   extra frags for a headshot kill (0 - 10, 0 = off)
  olds_hsf_knife  0   1 = knife headshots also give the extra frags
  olds_hsf_notify 1   1 = tell the killer in chat

The cvars are read at every kill, so a change works at once.

No sounds, models or sprites are added.

Credits and licence Written from scratch by alexit (olds.ro workshop) for workshop card LIB-2105. 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_hsfrag.sma, test/olds_hsfrag_test.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-2105).

Headshot Frag Value
v1.0.0Counter-Strike 1.6PluginNot tested yet
AMX Mod X 1.10Server engine ReHLDSNeeds ReAPI YesMetamod Metamod-R0 downloads3.4 KBUpdated 10 hours ago
Sign in to download
Pawn (AMX Mod X) · 121 lines
/*
 * Headshot Frag Value (olds.ro workshop card LIB-2105)
 *
 * A headshot kill on an enemy is worth more frags: on top of the normal
 * frag the killer gets olds_hsf_extra extra frags, and the scoreboard is
 * updated at once (ScoreInfo message).
 *
Show all 121 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.