Skip to content
View in the app

A better way to browse. Learn more.

Learn more

bhop-par-jumps/README.txt

README.txt
80 lines · 3.6 KB · Text
Raw
Bhop Par Jumps 1.0.0 (olds.ro)
==============================

An add-on for bhop timers. Each map gets a par: the number of jumps a clean
run needs, set by an admin or worked out from the best runs. When a runner
finishes, the chat shows their jump count against par, like golf:

  [Par] 40 jumps (2 under par)
  [Par] 42 jumps (at par)
  [Par] 50 jumps (8 over par)

say /par shows the par of the map and how many players on the server have
finished it at or under par.

Requirements
  - ReGameDLL_CS, Metamod-r and ReAPI
  - AMX Mod X 1.10 or newer with the nvault module (it ships with AMX Mod X)
  - A bhop timer whose core plugin calls these two public functions (with
    CreateMultiForward / ExecuteForward) when a player starts and finishes
    a run:
        olds_timer_start(id)
        olds_timer_finish(id)
    A timer with other forward names needs a small bridge plugin that calls
    these two. Without such a timer the plugin loads and counts nothing.
  - Tested on ReGameDLL_CS 5.30.0.814, ReAPI 5.29.0.358 and AMX Mod X
    1.10.0.5490

Install
  1. Compile scripting/olds_bhpar.sma with amxxpc 1.10 and copy
     olds_bhpar.amxx to addons/amxmodx/plugins/. The compiler needs ReAPI's
     include files (reapi.inc and reapi_*.inc) in
     addons/amxmodx/scripting/include/.
  2. Copy data/lang/olds_bhpar.txt to addons/amxmodx/data/lang/.
  3. Copy configs/plugins/olds_bhpar.cfg to addons/amxmodx/configs/plugins/.
  4. Optional: copy configs/olds_bhpar.ini to addons/amxmodx/configs/ (it
     only holds comments; amx_bhpar creates the file when it is missing).
  5. Add olds_bhpar.amxx to addons/amxmodx/configs/plugins.ini, after the
     timer's own plugin.

How jumps are counted
  - A start (olds_timer_start) sets the player's count to 0, also when a run
    is already going.
  - A jump counts when the player is on the ground and has just pressed the
    jump key (ReAPI hook on CBasePlayer::Jump). A held jump key counts once,
    the same rule the game uses for its own jumps.
  - At the finish (olds_timer_finish) the count is compared with par. A
    finish without a start is ignored.

Par
  - Admin par: amx_bhpar <jumps> on the map (admin flag "h", ADMIN_CFG)
    writes "<map> <jumps>" to addons/amxmodx/configs/olds_bhpar.ini.
    amx_bhpar 0 removes the map's line. The file can also be edited by hand.
  - Automatic par: on a map without an admin par and with olds_bhpar_auto 1,
    the par is the rounded average of the five lowest best counts on that
    map, as soon as five different players have finished it. Until then the
    map has no par and runners only see their count.
  - The best count of each player on each map is kept in the nvault file
    olds_bhpar (addons/amxmodx/data/vault/olds_bhpar.vault): by SteamID, or by
    name for bots and players without a unique SteamID (STEAM_ID_LAN).

Settings (addons/amxmodx/configs/plugins/olds_bhpar.cfg)
  olds_bhpar_enable  1   1 = on, 0 = off (no counting, no results)
  olds_bhpar_auto    1   1 = maps without an admin par get the automatic
                         par, 0 = admin pars only

Commands
  say /par            (also say_team) the par of this map and how many
                      players on the server finished at or under it
  amx_bhpar <jumps>   (admin, flag "h") sets the par of this map, 0 clears it
  olds_bhpar_status   (server console) the par of this map and where it comes
                      from, then each player's current run and best

Files
  Texts are in data/lang/olds_bhpar.txt (English). Nothing is downloaded by
  players.

Credits and licence
  Written from scratch by alexit (olds.ro workshop) for workshop card
  IDEA-2CFA4C7A90BDC4E8.
  Licence: 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.