Raised This Month: $ Target: $400
 0% 

demo recorder


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 08-20-2010 , 04:03   Re: demo recorder
Reply With Quote #6

Hmm, can u record from the actual server? get_user_name 0 i think get's the hostname right? So I don't think that the server can record unless u have HLTV.

Unless u have a player in the server just sitting there like a bot but an actual player who is recording?

So this is what I would do, I'd make it only check once, when the client enters the server, so you don't have a task.

Basically what this does if a person enters and their name is HNS......TV or w/e, it will send the command "record %s", demoname to them obviously not that exact command but w/e. So the person that is recording must be you or someone that you have access to their steam files and stuff. Then it will save the demo to their cstrike folder. Only downfall is that if they get kicked or soemthing, it won't stop recording.

So this is what I got.

Untested:
Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "auto demo recorder"
#define VERSION "2.0 updated"
#define AUTHOR "outsider"

new servername[65];
new demoname[16];

public plugin_init() {
    register_plugin(PLUGIN,VERSION,AUTHOR)
}

public client_putinserver(id) {
    server(id)
    return PLUGIN_CONTINUE
}

public server(id) {
    get_user_name(id,servername,64);
    if(equali(servername,"JB.RETRY.LV JAILBREAK 47/48p")) {
        demoname = "jb_retry_lv";
        record_demo(id)
        } else if(equali(servername,"HNS.RETRY.LV HIDE AND SEEK 47/48p")) {
    demoname = "hns_retry_lv";
    record_demo(id)
        } else if(equali(servername,"BB.RETRY.LV BASE BUILDER 47/48p")) {
    demoname = "bb_retry_lv";
    record_demo(id)
        } else if(equali(servername,"DD2.RETRY.LV DUST 2 LAND 47/48p")) {
    demoname = "dd2_retry_lv";
    record_demo(id)
        } else if(equali(servername,"CS.RETRY.LV PUBLIC 47/48p")) {
    demoname = "cs_retry_lv";
    record_demo(id)
        } else if(equali(servername,"ZM.RETRY.LV ZM+WAR3 47/48p")) {
    demoname = "zm_retry_lv";
    record_demo(id)
        } else if(equali(servername,"DR.RETRY.LV DEATHRUN 47/48p")) {
    demoname = "dr_retry_lv";
    record_demo(id)
        } else if(equali(servername,"SURF.RETRY.LV SURF 47/48p")) {
    demoname = "surf_retry_lv";
    record_demo(id)
        } else {
    demoname = "retry_lv";
    record_demo(id)
    }
}

public record_demo(id) {
    new name[35];
    get_user_name(id,name,34);
    
    new userip[20]
    get_user_ip(id,userip,19);
    
    new serverip[20]
    get_user_ip(0,serverip,19);
    
    client_cmd(id,"stop;record %s",demoname)
    client_print(id,print_center,"Recording to %s started...",demoname)
    client_print(id,print_chat,"Serveris: %s (%s)",servername,serverip)
    client_print(id,print_chat,"Niks: %s | IP: %s",name,userip)
    return PLUGIN_CONTINUE
}

Last edited by nikhilgupta345; 08-20-2010 at 04:06.
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
 



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 21:53.


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