Client Demo Recorder 1.0.0 (olds.ro)
====================================
Starts a demo on each player's own client when they join, named by map and
time (for example de_dust2_2130.dem), so players can replay their rounds.
Requirements
- AMX Mod X 1.10.0.5490 or newer
Install
1. Compile scripting/olds_cdemo.sma and copy olds_cdemo.amxx to
addons/amxmodx/plugins/.
2. Copy data/lang/olds_cdemo.txt to addons/amxmodx/data/lang/.
No downloads: the client's engine writes the demo file; the plugin only
sends the console command.
Settings (addons/amxmodx/configs/plugins/olds_cdemo.cfg, made on first run)
olds_cdemo_enable 1 1 = record demos on players' clients
olds_cdemo_delay 6.0 seconds after joining before the recording starts
olds_cdemo_optin 0 1 = record only for players who say /demo
olds_cdemo_bots 0 1 = also handle bots (for testing only; bots
have no client, so nothing is sent to them)
How it works
- olds_cdemo_delay seconds after a player joins (client_putinserver) the
plugin sends "stop;record <map>_<hhmm>" (get_mapname, get_time("%H%M")),
and tells the player in chat. "stop" first ends a demo still running
from the previous map, so after a map change the recording restarts
under the new map's name.
- say /demo toggles: while recording it stops the demo; otherwise it
starts one at once. With olds_cdemo_optin 1 nothing is recorded until
the player says /demo; the choice is kept in the player's own userinfo
(setinfo _cdemo 1) so it holds on the next maps.
- On disconnect the plugin forgets the player (the client's engine ends
the demo itself when it leaves the server).
- Clients that block server "record"/"stop" commands simply ignore them;
the server gets no error and nothing else changes.
Admin
amx_cdemo_status (ADMIN_KICK) who is recording and the demo names