Skip to content
View in the app

A better way to browse. Learn more.

Learn more

admin-set-score/README.txt

README.txt
54 lines · 2.6 KB · Text
Raw
Admin Set Score 1.1.0 (olds.ro)
===============================

Admins set a player's frags and deaths to exact values, to fix a mistake or
to hand out an event prize. Every player's scoreboard shows the new score at
once, the player is told in chat, and each change is written to the AMX Mod X
log.

Requirements
  - AMX Mod X 1.10 or newer (written and tested on 1.10.0.5490)
  - The cstrike and fun modules (they come with AMX Mod X)
  - Counter-Strike 1.6. ReAPI is not needed.

Install
  1. Compile scripting/olds_setscore.sma and copy olds_setscore.amxx to
     addons/amxmodx/plugins/.
  2. Copy data/lang/olds_setscore.txt to addons/amxmodx/data/lang/.
  3. Copy configs/plugins/olds_setscore.cfg to addons/amxmodx/configs/plugins/
     (if it is missing, the plugin writes it with the default values).
  4. Add olds_setscore.amxx to addons/amxmodx/configs/plugins.ini.

Command (admins with the ADMIN_RCON flag "l", and the server console)
  amx_setscore <name|#userid> <frags> <deaths>
    amx_setscore Bob 20 0       sets Bob's score to 20 / 0
    amx_setscore Bob +3 +0      adds 3 frags and keeps the deaths
    amx_setscore #12 -2 +1      takes 2 frags away and adds 1 death
  - A plain number sets the value; +n or -n changes the current value. A
    negative frag count is reached with -n (for example -5 from 0).
  - The player can be named by #userid (as shown by "status"), the exact name
    or a part of one name, in any letter case. If several players match, the
    command lists how many and changes nothing.
  - Frags may end from -olds_setscore_max to olds_setscore_max, deaths from 0
    to olds_setscore_max. A request outside these limits is refused and the
    score stays as it was.
  - A player without access gets "You have no access" and the usage line.

Settings (addons/amxmodx/configs/plugins/olds_setscore.cfg)
  olds_setscore_max 9999   highest frags or deaths value the command may set
                           (0 - 32767, the scoreboard limit)
  olds_setscore_log 1      1 = write each change to the AMXX log: admin,
                           player, old and new score; 0 = do not log

Log line example (addons/amxmodx/logs/L<date>.log)
  Cmd: "Admin<3><STEAM_0:1:123><>" set the score of "Bob<5><STEAM_0:0:456><>" from 5 / 2 to 20 / 0

Tested on ReHLDS 3.15.0.896, ReGameDLL_CS 5.30.0.814, Metamod-R 1.3.0.149,
AMX Mod X 1.10.0-git5490, with bots: setting and changing scores, the limits,
wrong input, a player without access, the scoreboard message and the log.

No sounds, models or sprites are added.

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