Raised This Month: $51 Target: $400
 12% 

HLTV Autorecord


Post New Thread Reply   
 
Thread Tools Display Modes
jonnzus
Epic Member
Join Date: Oct 2010
Location: Finland
Old 11-11-2012 , 13:08   Re: HLTV Autorecord
Reply With Quote #51

I'm using this in my linux server and it this does work well
Maybe you have spectators in your hltv server?
__________________
Quote:
367. Everyone's copyright will be broken. No exceptions.
jonnzus is offline
AllMassive
Senior Member
Join Date: Sep 2004
Location: /dev/urandom
Old 02-26-2013 , 16:40   Re: HLTV Autorecord
Reply With Quote #52

Code:
Executing file director.cfg.
Director module initialized.
Executing rcon "say [HLTV] Starting record... " from 1.1.1.1:49715.
#Cstrike_Chat_AllSpec
Executing rcon "say [HLTV] Starting record... " from 1.1.1.1:41820.
#Cstrike_Chat_AllSpec
Executing rcon "say [HLTV] Starting record... " from 1.1.1.1:36513.
#Cstrike_Chat_AllSpec
Executing rcon "say [HLTV] Starting record... " from 1.1.1.1:57188.
#Cstrike_Chat_AllSpec
>Player dropped

Executing rcon "say [HLTV] Starting record... " from 1.1.1.1:60162.
#Cstrike_Chat_AllSpec

Executing rcon "say [HLTV] Starting record... " from 1.1.1.1:60162.
#Cstrike_Chat_AllSpec
And so on - this is such a useful plugin but it doesnt seem to work with the latest Updates.
AllMassive is offline
Predator.Cat
Member
Join Date: Dec 2012
Location: Moscow, Russia
Old 05-08-2013 , 07:52   Re: HLTV Autorecord
Reply With Quote #53

Плагин не работает. HLTV стартует и сразу начинает писать демку, даже если на сервере никого нет.
Plugin dosn't work. HLTV starts and immediately begins to record a demo, even if the server is empty.
hltv.cfg

hltv_autorecord.sma

server console

HLTV console
Predator.Cat is offline
Send a message via ICQ to Predator.Cat
AllMassive
Senior Member
Join Date: Sep 2004
Location: /dev/urandom
Old 05-12-2013 , 12:24   Re: HLTV Autorecord
Reply With Quote #54

Dont change in the *.sma directly - put it into the amxx.cfg:

Code:
// hltv-autorec

autohltv_record 1 // - enables autorecording
autohltv_path "demos/HLTV-" // - it means, that you will have "cstrike/demos/HLTV-12389034.dem". If you want to put the demos into ctrike folder, just make this cvar empty.
autohltv_ignorebots 1 // - ignore bots as real players, it means that plugin will not count them at all (look next cvar). If you have bots, then change this cvar to 0 and change map on the server (or restart).
autohltv_minplayers 2 // - minimum number of players in game to start recording hltv
autohltv_pass "passwd" // - the pass to control hltv. Go to the hltv.cfg and find adminpassword there. Now you can change it to this or any other that you define by this cvar.
autohltv_time 0 // 0|1|2, 2 is default. 0 - no timer show as hudmessage. 1 - timer only for hltv. 2 - for all players. This may be usefull to set 2 for public servers, because it is not bad to know every second what the time is and y$
autohltv_delay 10.0 // - delay should be equal to delay in hltv.cfg (director.cfg) of HLTV-server configuration file.
AllMassive is offline
Predator.Cat
Member
Join Date: Dec 2012
Location: Moscow, Russia
Old 05-12-2013 , 16:35   Re: HLTV Autorecord
Reply With Quote #55

Quote:
Originally Posted by AllMassive View Post
Dont change in the *.sma directly - put it into the amxx.cfg:

Spoiler
It didn't help.

Last edited by Predator.Cat; 05-12-2013 at 16:36.
Predator.Cat is offline
Send a message via ICQ to Predator.Cat
PoLiCe
Senior Member
Join Date: Apr 2013
Location: Xen™
Old 05-13-2013 , 08:02   Re: HLTV Autorecord
Reply With Quote #56

What's the difference between HLTV Recorder & Auto-Demo Recorder Plugin..?
__________________
PoLiCe is offline
Send a message via MSN to PoLiCe Send a message via Skype™ to PoLiCe
Predator.Cat
Member
Join Date: Dec 2012
Location: Moscow, Russia
Old 05-21-2013 , 08:39   Re: HLTV Autorecord
Reply With Quote #57

When using this plugin, HLTV disconnected from the server after a while.
При использовании данного плагина HLTV теряет соединение с сервером через некоторое время.

Code:
Server connection lost (time out).
Disconnected.
Metamod v1.20
AMX Mod X 1.8.1.3746

hltv.cfg


amxx.cfg


server.cfg
Predator.Cat is offline
Send a message via ICQ to Predator.Cat
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 07-22-2013 , 10:08   Re: HLTV Autorecord
Reply With Quote #58

Can someone edit it in order to ignore who isnt admin?
__________________
Jhob94 is offline
_ck
Junior Member
Join Date: May 2013
Location: Russia, Togliatti
Old 07-22-2013 , 16:00   Re: HLTV Autorecord
Reply With Quote #59

what exactly do you want? Write more.
_ck is offline
Send a message via ICQ to _ck Send a message via Skype™ to _ck
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 07-22-2013 , 17:13   Re: HLTV Autorecord
Reply With Quote #60

Only record admins.
Well i made this edit:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <sockets>

#define TIMER_TASK 32490283094

new g_hltv_idg_realplayersnumg_hltv_recordingg_hltv_ip[16], g_hltv_portg_onlyadminsbool:g_mapchange
new g_hltvrec_cvarg_hltvpath_cvarg_minplayers_cvarg_hltvpassword_cvarg_onlyadmins_cvarg_recording_cvar    //, g_challenge_cvar
new g_hltv_challenge[13], g_show_time    // Contains the hltv rcon challenge number
new bool:g_challenging_rcong_autodelay_cvar

public plugin_init()
{
    
register_plugin("HLTV AutoRecord""1.7""Dr.Aft")
    
g_hltvrec_cvar register_cvar("autohltv_record""1")    // enable plugin
    
    // recording will be into cstrike/demos/HLTV-datetime.dem
    
g_hltvpath_cvar register_cvar("autohltv_path""demos/HLTV")
    
    
// only record admins
    
g_onlyadmins_cvar register_cvar("autohltv_onlyadmins""1")
    
g_onlyadmins get_pcvar_num(g_onlyadmins_cvar)
    
    
// minimal players to start record, when it will be 1 player, recording will be stopped
    
g_minplayers_cvar register_cvar("autohltv_minplayers""1")
    
    
// This is fix if hltv is already recording, server can crash if we send the socket command again
    
g_recording_cvar register_cvar("autohltv_recording""0"FCVAR_SERVER|FCVAR_SPONLY)
    if(
get_pcvar_num(g_recording_cvar))
        
g_hltv_recording 4
    
    
//g_challenge_cvar = register_cvar("autohltv_challenge", "", FCVAR_SPONLY|FCVAR_PROTECTED|FCVAR_UNLOGGED)
    
    // adminpassword for hltv
    
g_hltvpassword_cvar register_cvar("autohltv_pass""this is secret :P")
    
g_autodelay_cvar register_cvar("autohltv_delay""30.0")
    
    
register_cvar("autohltv_time""2")        // 2 - time for everyone, 1 - only to hltv, 0 - disabled
    
switch(get_cvar_num("autohltv_time"))
    {
        case 
0:    g_show_time = -2
        
case 1g_show_time    = -1        
    
}
    
set_task(180.0"prepare_for_mapchange"0"d")
    
set_task(1.0"mapchange"0"d")
}

public 
client_putinserver(id)
{
    if(
g_mapchange)
        return 
PLUGIN_CONTINUE
    
    
if(!is_user_admin(id))
        if(
g_onlyadmins)
            return 
PLUGIN_CONTINUE
        
    
if(is_user_hltv(id))    
    {
        if(
g_hltv_id == 0)
        {
            
g_hltv_id id
            
if(g_show_time > -2)
            {            
                if(
g_show_time == -1)
                    
g_show_time g_hltv_id
                
                
if(g_hltv_recording == 4)
                    
set_task(1.0"hltv_show_time"TIMER_TASK__"b")
            }            
        }
        
        new 
hltv_ipport[32]
        
get_user_ip(g_hltv_idhltv_ipport31)
        
        
strtok(hltv_ipportg_hltv_ip16hltv_ipport5':')
        
g_hltv_port str_to_num(hltv_ipport)
        
check_stop_record()
    }
    else
        
g_realplayersnum++    
    
    
    if(
g_hltv_id 0)
    {
        if(
g_realplayersnum >= get_pcvar_num(g_minplayers_cvar))
        {
            if(
get_pcvar_num(g_hltvrec_cvar) && g_hltv_recording 3)
            {
                
set_task(1.0"hltv_start_record")                
                
g_hltv_recording 3
            
}
        }
        
    }
    return 
PLUGIN_CONTINUE
}

public 
client_disconnect(id)
{
    if( (
is_user_admin(id) || !g_onlyadmins) && !g_mapchange)        
    {
        if(
id == g_hltv_id)
        {            
            
g_hltv_id 0            
            set_task
(15.0"flush_hltv")
            
hltv_freehandle_challenge()
        }
        else
        {
            
g_realplayersnum--
            
check_stop_record()
        }
    }
}


public 
flush_hltv()
{
    
//set_pcvar_string(g_challenge_cvar, "^0")
    
set_pcvar_num(g_recording_cvar0)
    
g_hltv_recording 0
    g_hltv_challenge 
""
    
    
if(g_show_time 0)
    {        
        
remove_task(TIMER_TASK)
        if(
g_show_time 0)
            
g_show_time = -1
    
}
}


public 
check_stop_record()
{
    if(
g_hltv_recording == && !g_mapchange)
            if(
g_realplayersnum get_pcvar_num(g_minplayers_cvar))
            {
                
set_task(1.0"hltv_stop_record")
                
g_hltv_recording 1
            
}
}


public 
hltv_start_record()
{
    new 
record_string[90]
    
hltv_rcon_command("say [HLTV] Starting record...")
    
get_pcvar_string(g_hltvpath_cvarrecord_string80)    
    
format(record_string90"record %s"record_string)    
    if(
get_pcvar_float(g_autodelay_cvar) > 5.0)
        
set_task(get_pcvar_float(g_autodelay_cvar) - 5.0"hltv_rcon_command"0record_stringstrlen(record_string))
    else
        
hltv_rcon_command(record_string)
}


public 
hltv_stop_record()
{    
    
hltv_rcon_command("stoprecording")        
    
hltv_rcon_command("say [HLTV] Stopped recording...")
}

public 
hltv_rcon_command(hltv_command[])
{
    
// Declare variables
    
new socket_address        // Contains the socket address of the hltv server 
    
new socket_error 0    // Contains the error code of the socket connection
    
    
    
new send[256]            // Contains the send socket command    
    
    
    
new hltv_password[20]    //, hltv_challenge[15]
            
    // Set hltv rcon password
    
get_pcvar_string(g_hltvpassword_cvarhltv_password19)
        
    
// Connect to the HLTV Proxy
    
socket_address socket_open(g_hltv_ipg_hltv_portSOCKET_UDPsocket_error)
        
    if (
socket_error != 0)
        return 
server_print("HLTV connection failure..."socket_error)
        
    
// Send challenge rcon and receive response
    // Do NOT add spaces after the commas, you get an error about invalid function call
    
    
if(equali(g_hltv_challenge""))
    {
        if(!
g_challenging_rcon)
        {
            
setc(send40xff)
            
copy(send[4], 255"challenge rcon")
            
setc(send[28], 1'^n')
            
            
socket_send2(socket_addresssend255)    
      
            
set_task(2.0"hltv_challenge_receive"socket_address)
            
g_challenging_rcon true
        
}
        
set_task(4.2"hltv_rcon_command"0hltv_commandstrlen(hltv_command))    
    }
    else
    {    
        
replace(g_hltv_challenge255"^n""")
        
        
// Set rcon command
        
setc(send2550x00)
        
setc(send40xff)
        
        
log_amx("hltv_command: %s"hltv_command)
        
formatex(send[4], 255"rcon %s %s %s ^n"g_hltv_challengehltv_passwordhltv_command)
        
log_amx("sending: %s"send)
        
socket_send2(socket_addresssend255)
        
socket_close(socket_address)
                
        switch(
hltv_command[0])
        {
            case 
'r':
            {
                if(
g_show_time > -2)
                    
set_task(1.0"hltv_show_time"TIMER_TASK__"b")
                
g_hltv_recording 4
                set_pcvar_num
(g_recording_cvar1)    
            }
            case 
's':        
            {
                
remove_task(str_to_num(g_hltv_challenge))
                
g_hltv_recording 0
                set_pcvar_num
(g_recording_cvar0)
            }
        }
            
        
socket_close(socket_address)
    }
    return 
PLUGIN_CONTINUE
}
    

public 
hltv_challenge_receive(socket_address)    
{
    if(
socket_change(socket_address))
    {
        if(
task_exists(socket_address))
            
remove_task(socket_address)
        new 
receive[255]    
        
socket_recv(socket_addressreceive255)
        
copy(g_hltv_challenge12receive[19])
        
set_task(20.0"hltv_freehandle_challenge")
        
g_challenging_rcon false
    
}
    else
    {
        new 
send[255], socket_error 0
        socket_close
(socket_address)
        
socket_address socket_open(g_hltv_ipg_hltv_portSOCKET_UDPsocket_error)
        if(
socket_error 0)
            
log_amx("HLTV not responding...")
        else
        {
            if(!
task_exists(socket_address))
            {
                
setc(send40xff)
                
copy(send[4], 255"challenge rcon")
                
setc(send[28], 1'^n')

                
socket_send2(socket_addresssend255)    
                
set_task(1.0"hltv_challenge_receive"socket_address)
            }
        }
    } 
}


public 
hltv_freehandle_challenge()
{
    
g_hltv_challenge ""
}    


public 
hltv_show_time()
{
    static 
time[22]
    
get_time("%d/%m/%Y - %X"time21)
    
set_hudmessage(01002000.770.1900.01.00.10.24)
    
show_hudmessage(g_show_timetime)
}
    

public 
prepare_for_mapchange()
{
    if(
task_exists(TIMER_TASK))
        
remove_task(TIMER_TASK)
}


public 
mapchange()
{    
    
g_mapchange true

I dont used much times hltv so maybe the problem is about configs....
__________________
Jhob94 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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