AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   SourceTV admin demorecord (sb_status/status support) (https://forums.alliedmods.net/showthread.php?t=69261)

urus 03-31-2008 13:17

SourceTV admin demorecord (sb_status/status support)
 
4 Attachment(s)


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

Davethegreat 03-31-2008 15:10

Re: SourceTV admin demorecord
 
Question how do you set up sourcetv?

CRJackyd 03-31-2008 15:15

Re: SourceTV admin demorecord
 
Put this in your cstrike/cfg/server.cfg

tv_enable 1

Nice plugin, will be testing this one :)

urus 03-31-2008 16:20

Re: SourceTV admin demorecord
 
Upss... sorry fixed small bug with phrase translation.
Please redownload plugin.

Quote:

Originally Posted by CRJackyd
Nice plugin, will be testing this one

Thanks =)

Harley 03-31-2008 18:19

Re: SourceTV admin demorecord
 
is the demo ok for steambans can sb_status inside

urus 03-31-2008 18:58

Re: SourceTV admin demorecord
 
Quote:

Originally Posted by Harley (Post 604941)
is the demo ok for steambans can sb_status inside

Give me more information about sb_status please.
Where should be this sb_status?

Harley 03-31-2008 20:07

Re: SourceTV admin demorecord
 
At the beginning of a demo must be involved in the console sb_status is almost like status
The steam id be listed in the console

http://www.steambans.com/support.php?c=info&page=htrad

I hope I could help

Unfortunately, my English is very bad

Solltex 04-02-2008 12:15

Re: SourceTV admin demorecord
 
L 04/02/2008 - 05:32:04: [SM] Native "GetClientAuthString" reported: Client index 0 is invalid
L 04/02/2008 - 05:32:04: [SM] Displaying call stack trace for plugin "srctv_demorec.smx":
L 04/02/2008 - 05:32:04: [SM] [0] Line 207, /home/groups/alliedmodders/forums/files/2/4/3/9/0/25172.attach::Startdemo()
L 04/02/2008 - 05:32:04: [SM] [1] Line 301, /home/groups/alliedmodders/forums/files/2/4/3/9/0/25172.attach::DemoreconConsole()

Extreme_One 04-02-2008 15:24

Re: SourceTV admin demorecord
 
Superb!

This will solve a few issues I've been having :D

Thank you.

urus 04-02-2008 19:37

Re: SourceTV admin demorecord
 
Quote:

Originally Posted by Harley (Post 604970)
At the beginning of a demo must be involved in the console sb_status is almost like status
The steam id be listed in the console
http://www.steambans.com/support.php?c=info&page=htrad

I hope I could help
Unfortunately, my English is very bad

My english is`t good too =).

Sorry but i don`t know, how result of sb_status command can be displayed in scrtv demo. sb_status/status commands being executed in server console don`t broadcast.

Quote:

Originally Posted by Solltex
L 04/02/2008 - 05:32:04: [SM] Native "GetClientAuthString" reported: Client index 0 is invalid
L 04/02/2008 - 05:32:04: [SM] Displaying call stack trace for plugin "srctv_demorec.smx":
L 04/02/2008 - 05:32:04: [SM] [0] Line 207, /home/groups/alliedmodders/forums/files/2/4/3/9/0/25172.attach::Startdemo()
L 04/02/2008 - 05:32:04: [SM] [1] Line 301, /home/groups/alliedmodders/forums/files/2/4/3/9/0/25172.attach::DemoreconConsole()

Command demorecon executed from server console, but it client (player`s) console command.


All times are GMT -4. The time now is 10:05.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.