Skip to content
View in the app

A better way to browse. Learn more.

Learn more

bhop-jump-rank/README.txt

README.txt
61 lines · 3 KB · Text
Raw
Bhop Jump Rank 1.0.0 (olds.ro)
==============================

Counts bunny hop jumps and ranks players by milestones. Totals are kept in a
database (MySQL or SQLite through SQLx), with an nVault fallback when the
database is down.

Requirements
  - AMX Mod X 1.10.0.5490 or newer with the sqlx (mysql or sqlite) and
    nvault modules, fakemeta

Install
  1. Compile scripting/olds_bhoprank.sma and copy olds_bhoprank.amxx to
     addons/amxmodx/plugins/.
  2. Copy data/lang/olds_bhoprank.txt to addons/amxmodx/data/lang/.
  3. Set the database cvars. The table olds_bhop is made on the first start.
  No downloads: the level-up sound is the stock events/task_complete.wav.

Settings (addons/amxmodx/configs/plugins/olds_bhoprank.cfg, made on first run)
  olds_bhop_streak 3                hops in a row before a run counts
  olds_bhop_levels "100,500,2000"   totals where the ranks start (ascending)
  olds_bhop_names "Walker,Hopper,Bunny,Rabbit King"
                                    rank names: one more than the levels
  olds_bhop_key 0                   player key: 0 = SteamID, 1 = name
  olds_bhop_driver "mysql"          mysql or sqlite
  olds_bhop_host, olds_bhop_user, olds_bhop_pass, olds_bhop_db
                                    connection (sqlite: olds_bhop_db is the
                                    file name in data/sqlite3)

Table
  olds_bhop (steamid VARCHAR(64) PRIMARY KEY, name VARCHAR(64), jumps INTEGER)

Players
  say /rank    your rank, jumps and how many to the next rank
  say /top15   the best 15 players (a MOTD window)

Admins
  amx_bhop_status (ADMIN_KICK)   every player's jumps, saved part, vault part,
                                 rank, and the database state; from the server
                                 console it also prints the top 15
  amx_bhop_save (ADMIN_CFG)      saves everybody now and merges the vault

How it works
  - FM_PlayerPreThink: leaving the ground going up (not in water, not on a
    ladder) is a jump; it is a hop when it comes within 0.1 s of the last
    landing. A jump from standing starts a new run. When a run reaches
    olds_bhop_streak hops the whole run is counted, then every further hop of
    the run counts at once. Ten jumps in a row count ten. The HUD shows the
    total and the rank while hopping.
  - Reaching a level announces the new rank in chat and plays the sound.
  - Saving (on leaving, at a level-up, every minute, on amx_bhop_save):
    only the jumps not saved yet are added to the row (INSERT IGNORE, then
    UPDATE jumps = jumps + n), so two servers can share the table. If the
    query fails, the jumps are added to the nVault "olds_bhop" instead and
    the key is listed as pending.
  - Merging: whenever the table answers (map start, every two minutes,
    amx_bhop_save) the pending jumps are added to the table and removed from
    the vault. At map end the unsaved jumps go to the vault first, so nothing
    is lost while threaded queries stop.
  - While the database is down, a joining player sees the last total this
    server knew (kept in the vault).

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.