View Single Post
Plugin Info:     Modification:          Category:         
MoHApX
Junior Member
Join Date: Nov 2010
Location: Russia, Nizhniy Novgorod
Old 01-25-2011 , 08:06   Auto Demo Recorder (rebuild)
Reply With Quote #1

Auto Demo Recorder
by MoHApX

Current Version: 3.0c
Last update: 23.03.2011


Plugin based on F4RR3LL's Auto Demo Recorder:
http://forums.alliedmods.net/showthread.php?t=89459

Thanks to:
Fysiks for menu code

Features:
  • Menu for admin to request demo on player
  • Ability for admin to force start recording demo on client
  • Player notification about demo request
  • Autostart recording demo on client's PC
  • Agreement menu for player
  • Different types of demo filenames: unique, the same, etc.
  • Logging demo filenames, demo requests, etc.
  • Multilingual

Cvars:
  • adr_rec_mode (0/1/2), default: "2"
    0 - turn off this plugin
    1 - autostart recording demo when player puts in server
    2 - start recording demo only when server admin requests it

  • adr_rec_delay "15", default: "15"
    Delay in seconds before start recording demo

  • adr_rec_info (0/1/2), default "1"
    Type of notification player about demo filename when recording starts. There are 3 types:
    0 - only default CS recording message in console
    1 - chat + default CS recording message in console
    2 - hud message + default CS recording message in console

  • adr_menu (0/1), default: "1"
    Turn on/off menu that asks player agreement before autostart recording demo. It's used only when adr_rec_mode is "1".

  • adr_prefix "adr", default: "adr"
    Prefix in demo filename. It can be your project name. It may be needed for player to identify definite demo.

  • adr_demo_name (0/1/2/3), default: "1"
    Demo filename type. There are 4 types:
    0 - recording to one file every demo (_prefix_autorecorded_demo.dem)
    1 - recording to unique file every map (_prefix_mapname_autorecorded_demo.dem)
    2 - recording to unique file each demo (_prefix_mapname_time_date.dem)
    3 - recording to unique file each demo with hash (_prefix_mapname_time_date_MD5-hash.dem)

  • adr_message_delay "60", default: "60"
    Delay in seconds before server shows you recommendation to clean game folder from old demos and information about plugin.
    0 - turn off this message.

  • adr_request_info (0/1/2), default: "2"
    Type of notification player when demo is requested by admin. There are 3 types:
    0 - console
    1 - console + chat
    2 - console + hud message

  • adr_upload_url "your site", default: "Ask server administrator for URL!"
    You may show URL in info messages where the player can upload requested demo

  • adr_obey_immunity (0/1), default: "1"
    0 - ignore player immunity flag
    1 - obey player immunity flag (no demo requests on this player, no kick if refuses to record demo)

  • adr_self_record (0/1), default: "1"
    0 - turn off self-recording function using "amx_record" without arguments
    1 - turn on self-recording function using "amx_record" without arguments

Commands:
  • amx_record <name or #userid>
    If no arguments - it starts to record demo on yourself with demo filename type 2.
    With argument (only for admins with "kick" access level) - it sends demo request to specified player and starts recording demo on his PC with demo filename type 3.

  • amx_recordmenu (only for admins with "kick" access level)
    Shows menu with all players where admin may choose player to request his demo. Usually it's used putting it into "custommenuitems.cfg".
    If server admin requests demo, it will record with demo filename type 3.

  • say /record or say_team /record
    Shows you motd window with information about this plugin.

Changelog:
Code:
23.03.2011 - version 3.0c
* fixed problem with wrong TaskIDs (demos didn't record sometimes)
* added removing tasks when player disconnects
* added cvar "adr_self_record" with ability to turn off self-recording function
* added new message in multilingual file

12.02.2011 - version 3.0b
* fixed double show of messages to client

27.01.2011 - version 3.0a
* fixed self-recording function using "amx_record" command
* fixed some mistakes in lang file
* fixed error in chat message parameters
* some code optimization
* changed default value of cvar "adr_rec_mode" to "2"
* added cvar "adr_rec_info"
* added cvar "adr_obey_immunity"
* added ability to simple change admin access flag to commands
* changed the way of logging
* added ability to turn on/off advanced logging
* motd file changed with new plugin version

25.01.2011 - version 3.0
* initial release
Translations:
PHP Code:
[en] - by MoHApX
[ru] - by MoHApX 
P.s.:
You may turn on advanced logging. You have to uncomment the line in .sma:
Code:
//#define ADR_ADVANCED_LOGGING
You may change admin access level to demo request commands by changing this line in .sma:
Code:
#define ADR_ACCESS_LEVEL ADMIN_KICK
Excuse me for bad English
Attached Files
File Type: sma Get Plugin or Get Source (auto_demo_recorder.sma - 1995 views - 16.0 KB)
File Type: txt auto_demo_recorder.txt (2.1 KB, 1019 views)
File Type: txt motd_adr_info.txt (869 Bytes, 800 views)

Last edited by MoHApX; 03-23-2011 at 06:48.
MoHApX is offline
Send a message via ICQ to MoHApX Send a message via Skype™ to MoHApX