Custom HUD Message Command 1.0.0 (olds.ro)
==========================================
Lets an admin put a text on the screen of everyone, one team or one player,
at a chosen place, in a chosen colour, for a chosen number of seconds.
Requirements
- AMX Mod X 1.10 or newer (no extra modules, ReAPI is not needed)
- Written for AMX Mod X 1.10.0.5490, ReHLDS 3.15.0.896, ReGameDLL_CS 5.30.0.814
Install
1. Compile scripting/olds_hudmsg.sma with amxxpc 1.10 and copy
olds_hudmsg.amxx to addons/amxmodx/plugins/.
2. Copy data/lang/olds_hudmsg.txt to addons/amxmodx/data/lang/.
3. Copy configs/plugins/olds_hudmsg.cfg to addons/amxmodx/configs/plugins/
(if you skip this, the plugin writes the same file with the defaults on
its first start).
4. Add olds_hudmsg.amxx to addons/amxmodx/configs/plugins.ini.
Command (admins with the ADMIN_CHAT flag "i", and the server console)
amx_hudmsg <target> <x> <y> <r> <g> <b> <seconds> <text>
target @all, @t (Terrorists), @ct (Counter-Terrorists), a player's
name or part of it, or #userid
x, y 0.0 = left / top, 1.0 = right / bottom, -1 = centred.
Other values are clamped to 0.0 - 1.0.
r g b colour, 0 to 255 each (higher values become 255)
seconds how long the text stays: 0.5 to 60 (clamped)
text the rest of the line; write \n for a new line
Examples
amx_hudmsg @all -1 0.3 0 255 0 8 Welcome to olds.ro
amx_hudmsg @ct 0.05 0.6 255 255 255 5 Defend B!\nTwo enemies seen
amx_hudmsg #12 -1 -1 255 0 0 4 Last warning
- The admin's console says where the message went, how many players got
it and the values used, and whether a value was clamped.
- Every message is written to the AMX Mod X log with the admin's name.
- Admins without the flag are refused and nothing is shown.
- The access flag can be changed in addons/amxmodx/configs/cmdaccess.ini.
Settings (addons/amxmodx/configs/plugins/olds_hudmsg.cfg)
olds_hudmsg_channel 3 HUD channel (1-4); another plugin's text on the
same channel is replaced by this one
olds_hudmsg_maxlen 120 longest text in bytes; a longer text is cut
(never inside a letter)
Texts are in data/lang/olds_hudmsg.txt (English). Add a section such as [ro]
to translate them. No sounds, models or sprites are used.
Credits and licence
Written from scratch by alexit (olds.ro workshop) for workshop card LIB-1525.
Licence: GNU GPL version 3 or later (GPL-3.0-or-later).