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

Auto Demo Recorder


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ComedyShotsGamer
Senior Member
Join Date: Mar 2016
Old 04-30-2016 , 11:32   Auto Demo Recorder
Reply With Quote #1

Hello i need help with the Auto Demo Recorder Plugin https://forums.alliedmods.net/showthread.php?p=770786

I want it to be:
If i join the Server with name Nicklas the plugin will print this messages in the Chat
-[AMXX] Welcome to this Server Nicklas
-[AMXX] The Server is recording an Auto Record Demo "Name of Demo"
-[AMXX] Date 30.04.2016 Time: 172

Last edited by ComedyShotsGamer; 04-30-2016 at 11:45.
ComedyShotsGamer is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 04-30-2016 , 11:57   Re: Auto Demo Recorder
Reply With Quote #2

Change demo name here

PHP Code:
new const g_szDemoName[] = "yourdemoname" 
The Plugin:
PHP Code:
#include <amxmodx>  

#define NAME "Auto recording demo"  
#define VERSION "1.0"  
#define AUTHOR "AlliedMods"  

new g_DemoEnableg_DemoRdelay;
new const 
g_szDemoName[] = "yourdemoname"

public plugin_init()  
{  
    
register_pluginNAMEVERSIONAUTHOR )  
    
    
g_DemoEnable register_cvar("amx_demo_enable""1")  
    
g_DemoRdelay register_cvar("amx_demo_record_delay""8"
    
}  

public 
client_putinserver(id)  
{  
    if(
get_pcvar_num(g_DemoEnable))  
    {  
        
set_task(get_pcvar_float(g_DemoRdelay), "task_record"id);  
    }  
}  

public 
task_record(id)  
{  
    if( 
is_user_connected(id))  
    {  
        new 
Name[33], Time[9], Date[12]
        
        
get_user_name(idName32)  
        
        
get_time("%H:%M:%S"Time8)  
        
get_time("%d.%m.%Y"Date11)  
        
        
client_cmd(id"stop; record ^"%s^""g_szDemoName)  
        
        
ChatColor(id"^3[^4AMXX^3]^1 Welcome to this Server, ^3%s^1!"Name)  
        
ChatColor(id"^3[^4AMXX^3]^1 The Server is recording ^"^3%s.dem^1^""g_szDemoName)  
        
ChatColor(id"^3[^4AMXX^3]^1 Date: ^4%s^1 Time: ^4%s^1"DateTime)  
        
    }   
}    

stock ChatColor(const id, const input[], any:...)  
{  
    new 
count 1players[32]  
    static 
msg[191]  
    
vformat(msg190input3)  
    
    
replace_all(msg190"!g""^4"
    
replace_all(msg190"!y""^1")  
    
replace_all(msg190"!t""^3")  
    
    if (
idplayers[0] = id; else get_players(playerscount"ch")  
    {  
        for (new 
0counti++)  
        {  
            if (
is_user_connected(players[i]))  
            {  
             
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])  
             
write_byte(players[i]);  
             
write_string(msg);  
             
message_end();  
            }  
        }  
    }  

siriusmd99 is offline
ComedyShotsGamer
Senior Member
Join Date: Mar 2016
Old 04-30-2016 , 13:23   Re: Auto Demo Recorder
Reply With Quote #3

Thanks Working
ComedyShotsGamer 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 20:15.


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