Log Example
Quote:
L 03/31/2008 - 18:25:19: Admin <testadmin> <STEAM_0:0:xxxxxxx> start record a demo 2008.03.31_18-25-de_dust2 (7 minutes)
L 03/31/2008 - 18:32:18: Demo record stopped on time elapsed
L 03/31/2008 - 18:32:18: -----------------------------------
L 03/31/2008 - 18:33:46: Admin <testadmin> <STEAM_0:0:xxxxxxx> start record a demo 2008.03.31_18-33-de_dust2 (20 minutes)
L 03/31/2008 - 18:36:33: Admin "testadmin<3><STEAM_0:0:xxxxxxx><>" stopped record a demo
L 03/31/2008 - 18:36:33: -----------------------------------
L 03/31/2008 - 18:37:12: Admin <testadmin> <STEAM_0:0:xxxxxxx> start record a demo 2008.03.31_18-37-de_dust2 (10 minutes)
L 03/31/2008 - 18:38:14: Stop recording demo on ClientDiscconnect
L 03/31/2008 - 18:38:14: -----------------------------------
|
Description
This is admin tool for sourceTV demo recording. As example it`s good for silently catch cheaters.
Demo record will autostop if time elapsed or if admin leave server (can be disabled by cvar).
Demo record can stop only that admin who has begun record.
Admin rights for use this plugin is
o (Admin_Custom1).
Requirements
Enabled SourceTV on server (tv_enable 1)
Console commands
- demorec - display menu for record, stop, check status (bypass admin menu)
- demorecon - command for start record with user defined time in minutes (demorecon 3/demorecon 12, etc)
- demorecoff - command for stop record
- demodump - send sb_status or status* command to sourceTV
Cvars
- demorec_times -comma delimited! Time in minutes for record time menu. You can edit/delete/add your own time. Max 14 items! (default value "0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60")
- demorec_status - this option determines if sb_status or status command can be executed while recording a demo (0 - disable; 1 - sb_status; 2 - status*; default value "0")
- demorec_status_time - time in seconds (after record start) when sb_status/status will be executed (0 - disable; default value "0")
- demorec_onadmin_leave - should demo record autostop when admin disconnect from server (0 - disable; default value "1")
- demorec_folder - directory where server store demos. If this cvar empty, demos will store in root directory (cstrike, dod, tf, etc.). If you fill this cvar you must create folder in mod's root directory with the same name! (default value "")
- demorec_log -enable/disable logging to a file demorec.log (default value "1")
Installation
1. Copy srctv_demorec.smx into sourcemod\plugins folder
2. Copy plugin.demorecord.txt into sourcemod\translations folder
3.
Optional: change setting in mod_folder\cfg\sourcemod\plugin_demorec.cfg (this file will be automatically created after first plugin load)
4.
Optional: if you fill cvar
demorec_folder then create folder in mod's root directory with the same name. For linux users - srcds must have write access to this folder.
* about status command
It fake status command.
I just send information in SourceTV`s chat (PrintToChat).
See screenshot.
Q: Ок, why you don`t use PrintToConsole?
A: Because SourceMod terminate PrintToConsole message which was send to a bot:
Code:
static cell_t sm_PrintToConsole(IPluginContext *pCtx, const cell_t *params)
{
bla-bla.....
/* Silent fail on bots, engine will crash */
if (pPlayer->IsFakeClient())
{
return 0;
}
bla-bla.....
}
Changelog:
0.4
cleanup and optimize code
added commands:
demorec
demodump
added cvars:
demorec_times
demorec_status
demorec_status_time
demorec_onadmin_leave
demorec_folder
demorec_log
slightly changed demo names - dots (.) replaced with dash (-)
translation file updated!
0.3
Integrated into sm_admin menu (
server commands tab)
Added infinite demo record (command
demorecon 0)
Now demo can be recorded from server console (command
demorecon)
translation file updated!
0.1
Release
Function for check status taken from
warmup plugin