Skip to content
View in the app

A better way to browse. Learn more.

Learn more

pressed-keys-display/README.txt

README.txt
51 lines · 2.4 KB · Text
Raw
Pressed Keys Display 1.0.0 (olds.ro)
====================================

Spectators see which keys the player they watch is pressing, as a short
line such as "W A  JUMP  DUCK". The line follows the spectator's target,
shows "-" while no key is pressed, and disappears when the camera stops
following a player or the watched player dies. Useful to check movement
and to spot scripts.

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

Commands
  say /keys   (also in team chat) Turns the line off or on for you. The
              choice stays until you leave the server.

How it works
  - Every frame the keys of each living player are read from pev_button
    (client_PreThink). A key tapped between two checks is still shown.
  - Keys shown, in this order: W A S D (movement), JUMP, DUCK, WALK, USE,
    RELOAD, FIRE, ALT (secondary attack).
  - Every olds_keys_rate seconds each spectator's line is checked; it is
    sent on HUD channel 2 only when the text or the watched player changed,
    and once a second to keep it on the screen. It never flickers.
  - A spectator watches a player when his camera follows that player
    (first person, chase cam, or the overview map following him). In free
    look, or when the watched player dies, the line goes away until the
    camera follows a living player again.
  - With olds_keys_self 1 living players also see their own keys.

Settings (addons/amxmodx/configs/plugins/olds_keys.cfg)
  olds_keys_pos "0.45 0.9"   HUD position "x y", 0 - 1 (-1 = centred)
  olds_keys_self 0           1 = living players also see their own keys
  olds_keys_rate 0.1         seconds between two checks (0.05 - 1)

No sounds, models or sprites are added.

Credits and licence
  Written from scratch by alexit (olds.ro workshop) for workshop card LIB-2067.
  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.