Skip to content
View in the app

A better way to browse. Learn more.

Learn more

readable-message-hold/README.txt

README.txt
73 lines · 3.4 KB · Text
Raw
Readable Message Hold 1.0.0 (olds.ro)
=====================================

Players who read slowly can make HUD messages stay on screen longer: 1x,
1.5x, 2x and so on, up to a limit the server sets. Each player chooses with
/readtime, and the choice is saved. A message sent to everyone is shown to
each player with their own time, so players on 1x still see it for the
normal time.

This is a library: it changes the HUD messages of plugins that take part,
that is, plugins that show their messages with olds_hud_show() from the
included olds_readtime.inc instead of set_hudmessage() and show_hudmessage().
Messages of other plugins and of the game keep their normal time.

Requirements
  - AMX Mod X 1.10 or newer with the nvault module (it ships with AMX Mod X)
  - Tested on AMX Mod X 1.10.0.5490 (ReHLDS 3.15, ReGameDLL_CS 5.30)

Install
  1. Compile scripting/olds_readtime.sma with amxxpc 1.10 and copy
     olds_readtime.amxx to addons/amxmodx/plugins/.
  2. Copy data/lang/olds_readtime.txt to addons/amxmodx/data/lang/.
  3. Copy configs/plugins/olds_readtime.cfg to addons/amxmodx/configs/plugins/.
  4. Add olds_readtime.amxx to addons/amxmodx/configs/plugins.ini, above the
     plugins that use it.
  5. For plugin authors: copy scripting/include/olds_readtime.inc to
     addons/amxmodx/scripting/include/.

Commands
  /readtime        (say or say_team) opens a menu: 1x, 1.5x, 2x ... up to
                   olds_readtime_max (and the maximum itself when it falls
                   between two steps, such as 1.8x). Your choice is marked.
  /readtime <n>    sets the hold time directly, for example /readtime 1.5.
                   Anything outside 1 to olds_readtime_max gets a reply with
                   the allowed range.
  olds_readtime_status   (server console) each player's choice and the last
                   hold time a message got for them

Settings (addons/amxmodx/configs/plugins/olds_readtime.cfg)
  olds_readtime_enable  1     1 = choices are used, 0 = every message keeps
                              its normal time and /readtime only says so
                              (choices are kept for later)
  olds_readtime_max     2.0   longest hold time a player can choose (1 - 5);
                              a saved choice above it is used as this value

For plugin authors (scripting/include/olds_readtime.inc)
  #include <olds_readtime>

  Float:olds_readtime_get(id)
      The player's multiplier, 1.0 when the plugin is off.

  olds_hud_show(id, r, g, b, Float:x, Float:y, Float:holdtime, const text[])
      Shows text like set_hudmessage(r, g, b, x, y, 0, 6.0, hold, 0.1, 0.2, -1)
      followed by show_hudmessage(), where hold = holdtime x the player's
      multiplier. id 0 shows it to every player, each with their own time.
      Returns the number of players it was shown to.

  The include file also shows how to make the library optional, so a plugin
  still works on servers without it.

Saving
  Choices are saved in addons/amxmodx/data/vault/olds_readtime.vault: by
  SteamID, or by name for bots and players without a unique SteamID
  (STEAM_ID_LAN).

Files
  No sounds, models or sprites; nothing is downloaded by players. Texts are
  in data/lang/olds_readtime.txt (English).

Credits and licence
  Written from scratch by alexit (olds.ro workshop) for workshop card
  IDEA-3626EAE5A4C5A12F, after an idea seen on goldsrc.ru (resources/277).
  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.