addonsVersion 1.0.0: First release.
README.txtVersion 1.0.0: First release.
Cue Profiles 1.0.0 (olds.ro)
============================
One setting per player for how olds.ro plugins give their cues: as text, as
sound, or both. Some players play without sound, others do not read chat in a
fight; with Cue Profiles each player picks what works for them, once, and
every participating plugin follows it.
A player types /cues in chat to cycle text -> sound -> both. The choice is
saved by Steam ID, so it is back on the next visit.
For server owners
Install it once. Plugins that support Cue Profiles (they say so in their
README) then follow each player's choice. Plugins that do not support it
are not affected.
For plugin authors
Include scripting/include/olds_cues.inc and:
new cue = olds_cue_register("my_beep", "buttons/blip1"); // in plugin_init
olds_cue_play(id, cue, "Bomb planted at %s", site); // when it happens
The setting is applied like this:
- text only: the text is shown, the sound is not played;
- sound only: the sound is played; a cue without a registered sound still
shows its text, so nothing is lost;
- both: text and sound.
A cue given without text has no text equivalent and always plays its sound.
olds_cue_get_mode(id) returns 0 text, 1 sound, 2 both.
A custom sound must be precached by your own plugin.
Requirements
- AMX Mod X 1.10 or newer with the nvault module (ships with AMX Mod X)
- No ReAPI needed
- Tested on AMX Mod X 1.10.0.5490, ReHLDS 3.15.0.896, ReGameDLL_CS 5.30.0.814
Install
1. Compile scripting/olds_cueprofile.sma with amxxpc 1.10 and copy
olds_cueprofile.amxx to addons/amxmodx/plugins/.
2. Copy scripting/include/olds_cues.inc to addons/amxmodx/scripting/include/
(only needed to compile plugins that use it).
3. Copy data/lang/olds_cueprofile.txt to addons/amxmodx/data/lang/.
4. Copy configs/plugins/olds_cueprofile.cfg to addons/amxmodx/configs/plugins/.
5. Add olds_cueprofile.amxx to addons/amxmodx/configs/plugins.ini, above the
plugins that use it.
Commands
/cues (chat or team chat) cycles your setting: text -> sound -> both
Settings (addons/amxmodx/configs/plugins/olds_cueprofile.cfg)
olds_cueprofile_default 2 setting for players without a saved choice:
0 = text, 1 = sound, 2 = both
Notes
- Players without a lasting Steam ID (bots, LAN or pending IDs) keep their
choice until they leave.
- If the vault file (data/vault/olds_cueprofile.vault) is damaged or cannot
be opened, every choice lasts until the player leaves, one line in the
AMX Mod X log says so when the map starts, and the damaged file is left
untouched so you can look at it or delete it.
- A player who joins in a slot that someone just left starts from the
default, never from the previous player's choice.
No sounds, models or sprites are added. Texts are in
data/lang/olds_cueprofile.txt (English).
Credits and licence
Written from scratch by alexit (olds.ro workshop) for workshop card AMX-083.
Licence: GPL-3.0-or-later.