Skip to content
View in the app

A better way to browse. Learn more.

Learn more

kill-distance-display/README.txt

README.txt
50 lines · 2.3 KB · Text
Raw
Kill Distance Display 1.0.0 (olds.ro)
=====================================

After every kill the killer sees, in the centre of the screen, how far
away the victim was, such as "Kill distance: 34.2 m". The victim can see
it too: "Killed by Terry from 34.2 m". The distance can be shown in
metres or in feet.

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

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

How it works
  - When a player is killed (ReAPI hook RG_CBasePlayer_Killed, post), the
    distance between the killer's and the victim's origins is measured in
    game units and converted: 1 unit = 0.0254 m, 12 units = 1 ft. It is
    rounded to one decimal, so 1000 units read 25.4 m or 83.3 ft.
  - The killer gets the line in the centre of the screen; with
    olds_kdist_victim 1 the victim gets it too, with the killer's name.
  - A grenade kill shows the distance from where the thrower stands at the
    moment the grenade kills.
  - Suicides, kills by the world (falls, the bomb, map hazards) and kills
    by entities that are not players show nothing.
  - With olds_kdist_knife 0 knife kills show nothing. With olds_kdist_min
    above 0 kills closer than that distance show nothing.

Settings (addons/amxmodx/configs/plugins/olds_kdist.cfg)
  olds_kdist_unit   1   1 = metres, 2 = feet
  olds_kdist_victim 1   1 = the victim also sees the distance
  olds_kdist_min    0   kills closer than this (in the chosen unit) show
                        nothing; 0 = every kill
  olds_kdist_knife  1   1 = knife kills show the distance too, 0 = not

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-2111.
  Licence: GNU GPL version 3 or later (GPL-3.0-or-later).

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.