Jump to content
Sign in to follow this  
Batranu Bumi

Amx_record plus version

Recommended Posts

Descriere:  Cu acest plugin puteti depista codatii usor, este necesar doar sa le cereti demo-ul.

+ Report
+ JoinIP
este un plugin asemaanator cu https://forums.alliedmods.net/showthread.php?t=82874doar ca este mai avansat

# Download: amxx => http://www.amxmodx.org/webcompiler.cgi?go=dl&id=1809626 sma =>

#include <amxmodx>

#include <amxmisc>
#include <geoip>
#include <csx>
 
#pragma semicolon 1
 
#define COUNTRY
 
new timer[32];
new g_On[ 33 ] = 0;
new const g_Demoname[] = "Record";
new g_msgsaytext;
new toggle_plugin, toggle_mode;
new g_AdminChatFlag = ADMIN_CHAT;
new p_name[32];
new c_reportcheater;
#define ACCESS ADMIN_KICK
 
 
public plugin_init() {
        register_plugin("Record Codati", "1.0", "Bumi");
       
        register_concmd("amx_record", "record", ADMIN_BAN,"<nume> - fa un demo jucatorului");
        register_concmd("amx_recordx", "recordx", ADMIN_BAN,"<nume> - opreste demo");
        register_clcmd("say /report","saytoadminscheater");
        register_clcmd ( "say", "handle_say" );
        register_clcmd ( "say_team", "handle_say" );
        g_msgsaytext = get_user_msgid("SayText");
        c_reportcheater = register_cvar("amx_reportcheater","1");
}
 
public client_putinserver( i_Index )
        g_On[ i_Index ] = 0;
 
 public client_connect(id)
{
   if(get_pcvar_num(toggle_plugin) != 1)
      return PLUGIN_CONTINUE;
     
   static name[ 32 ], auth[ 32 ], ip[ 32];
   static code2[ 3 ], code3[ 4 ], country[ 46 ];
   
   get_user_name(id, name, sizeof name - 1);
   get_user_authid(id, auth, sizeof auth - 1);
   get_user_ip(id, ip, sizeof ip - 1);
   
   #if defined COUNTRY
   switch(get_pcvar_num(toggle_mode))
   {
      case 1: geoip_code2(ip, code2);
      case 2: geoip_code3(ip, code3);
      case 3: geoip_country(ip, country, sizeof country - 1);
      default: geoip_code2(ip, code2);
   }
   
   print("^x01[^x04 %s ^x01 ] [^x04 %s ^x01 ] [^x04 %s ^x01] se conecteaza", name, ip, country);
   
   #else
   
   print("^x01[^x04 %s ^x01 ] [^x04 %s ^x01 ] se conecteaza", name, ip);
   
   #endif
   return PLUGIN_CONTINUE;
}
 
public client_disconnect(id)
{
   if(get_pcvar_num(toggle_plugin) != 1)
      return PLUGIN_CONTINUE;
     
   static name[ 32 ], auth[ 32 ], ip[ 32];
   static code2[ 3 ], code3[ 4 ], country[ 46 ];
   
   get_user_name(id, name, sizeof name - 1);
   get_user_authid(id, auth, sizeof auth - 1);
   get_user_ip(id, ip, sizeof ip - 1);
   
   #if defined COUNTRY
   switch(get_pcvar_num(toggle_mode))
   {
      case 1: geoip_code2(ip, code2);
      case 2: geoip_code3(ip, code3);
      case 3: geoip_country(ip, country, sizeof country - 1);
      default: geoip_code2(ip, code2);
   }
   
   print("^x01[^x04 %s ^x01 ] [^x04 %s ^x01 ] [^x04 %s ^x01] a iesit", name, ip, country);
   
   #else
   
   print("^x01[^x04 %s ^x01 ] [^x04 %s ^x01 ] a iesit", name, ip);
   
   #endif
   return PLUGIN_CONTINUE;
}
 
public client_putinserverz(id)
{
   if(get_pcvar_num(toggle_plugin) != 1)
      return PLUGIN_CONTINUE;
     
   static name[ 32 ], auth[ 32 ], ip[ 32];
   static code2[ 3 ], code3[ 4 ], country[ 46 ];
   
   get_user_name(id, name, sizeof name - 1);
   get_user_authid(id, auth, sizeof auth - 1);
   get_user_ip(id, ip, sizeof ip - 1);
   
   #if defined COUNTRY
   switch(get_pcvar_num(toggle_mode))
   {
      case 1: geoip_code2(ip, code2);
      case 2: geoip_code3(ip, code3);
      case 3: geoip_country(ip, country, sizeof country - 1);
      default: geoip_code2(ip, code2);
   }
   
   print("^x01[^x04 %s ^x01 ] [^x04 %s ^x01 ] [^x04 %s ^x01] a intrat", name, ip, country);
   
   #else
   
   print("^x01[^x04 %s ^x01 ] [^x04 %s ^x01 ] a intrat", name, ip);
   
   #endif
   return PLUGIN_CONTINUE;
}
 
print(const message[],{Float,Sql,Result,_}:...)
{
   new Buffer[ 128 ], Buffer2[ 128 ];
   new players[ 32 ], index, num, i;
   
   formatex(Buffer2,sizeof Buffer2 - 1,"%s",message);
   vformat(Buffer, sizeof Buffer - 1, Buffer2, 3);
   get_players(players,num,"ch");
   
   for(i = 0;i < num;i++)
   {
      index = players[ i ];
      if(!is_user_connected(index)) continue;
     
      message_begin(MSG_ONE, g_msgsaytext, _, index);
      write_byte(index);
      write_string(Buffer);
      message_end();
   }
}
 
public demo(id,level,cid){
        if(!cmd_access(id, level, cid, 2))
                return PLUGIN_HANDLED;
               
        new cmd[32], mapname[32], name[32];
       
        read_argv(1, cmd, 31);
       
        new player = cmd_target(id, cmd, 5);
       
        if (!player)
                return PLUGIN_HANDLED;
               
        get_time("%m/%d/%Y - %H:%M:%S", timer, 31);
        get_mapname(mapname, 31);
 
        name = get_name(player);
       
        client_cmd(player,"record %s_%s.dem", name, mapname);
        client_print(id, print_console,"[www.Rangfort.com] Demo a inceput la %s, ora: %s", name, timer);
       
        log_amx("[www.Rangfort.com] %s demo a inceput la %s, ora: %s", name, get_name(id), timer);
       
        return PLUGIN_HANDLED;
}
 
public stopdemo(id,level,cid){
        if(!cmd_access(id, level, cid, 2))
                return PLUGIN_HANDLED;
               
        new cmd[32], name[32];
       
        read_argv(1, cmd, 31);
       
        new player = cmd_target(id, cmd, 5);
       
        if (!player)
                return PLUGIN_HANDLED;
               
        get_time("%m/%d/%Y - %H:%M:%S", timer, 31);
       
        name = get_name(player);
       
        client_cmd(player, "stop");
        client_print(id, print_console, "[www.Rangfort.com] Ai oprit demoul la %s, ora: %s", name, timer);
       
        log_amx("[www.Rangfort.com] %s Ai oprit demo la %s, Ora: %s",name, get_name(id), timer);
       
        return PLUGIN_HANDLED;
}
 
public  client_death ( killer, victim, wpnindex, hitplace, TK )
{
        get_user_name(killer,p_name,31);
}      
public saytoadminscheater(id)
{
        if(get_pcvar_num(c_reportcheater))
        {
               
                new message[192], name[32], authid[32], userid;
                new players[32], inum;
               
                read_args(message, 191);
                remove_quotes(message);
                get_user_authid(id, authid, 31);
                get_user_name(id, name, 31);
                userid = get_user_userid(id);
                       
                format(message, 191, "%L %s :  Reporting Player %s Reason:Cheat", id, "PLAYER", name, p_name);
       
                get_players(players, inum);
       
                for (new i = 0; i < inum; ++i)
                {
                        if (players != id && get_user_flags(players) & g_AdminChatFlag)
                                client_print(players, print_chat, "%s", message);
                }
       
                client_print(id, print_chat, "%s", message);
       
                return PLUGIN_HANDLED;
        }
}
 
 
public cmdSay(i_Index)
{
        new szSaid[ 192 ], szArgs[ 2 ][ 32 ];
        read_args( szSaid, 191 );
        remove_quotes( szSaid );
 
        parse( szSaid, szArgs[ 0 ], 31, szArgs[ 1 ], 31 );
 
        if( equali( szArgs[ 0 ], ".demo" ) )
        {
                if( !( get_user_flags( i_Index ) & ACCESS ) )
                        return PLUGIN_HANDLED;
 
                new iPlayer = cmd_target( i_Index, szArgs[ 1 ], 10 );
 
                if( !iPlayer )
                {
                        client_print( i_Index, print_chat, "[Rangfort] Jucatorul nu e conectat." );
                        return PLUGIN_HANDLED;
                }
 
                if( !is_user_alive( iPlayer ) )
                {
                        client_print( i_Index, print_chat, "[Rangfort] Jucatorul nu e in viata." );
                        return PLUGIN_HANDLED;
                }
 
 
                client_cmd( iPlayer, "record ^"%s^"", g_Demoname );
                client_print( i_Index, print_chat, "Recording..." );
 
                g_On[ i_Index ] = 1;
        }
 
        if( equali( szArgs[ 0 ], ".stop" ) )
        {
                if( !( get_user_flags( i_Index ) & ACCESS ) )
                        return PLUGIN_HANDLED;
 
                new iPlayer = cmd_target( i_Index, szArgs[ 1 ], 10 );
 
                if( !iPlayer )
                {
                        client_print( i_Index, print_chat, "[Rangfort] Jucatorul nu e conectat." );
                        return PLUGIN_HANDLED;
                }
 
                if( !is_user_alive( iPlayer ) )
                {
                        client_print( i_Index, print_chat, "[Rangfort] Jucatorul nu e in viata." );
                        return PLUGIN_HANDLED;
                }
       
                if( g_On[ iPlayer ] )
                {
                        client_cmd( iPlayer, "stop" );
                        client_print( i_Index, print_chat, "[Rangfort] Demo stopped." );
                        g_On[ iPlayer ] = 0;
                }
        }
 log_amx("[Rangfort] Adminul %s ii face demo lui %s");
        return PLUGIN_CONTINUE;
}
 
stock get_name(id) { static name[32]; get_user_name(id, name, 31); return name;}

# Nume: Record
# Versiunea: 1.0
# Instalare:

=> Fisierul amx_record.sma il puneti in addons/amxmodx/scripting
=> Fisierul amx_record.amxx il puneti in addons/amxmodx/plugins
=> Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
amx_record.amxx

 

cvar-uri: "amx_reportcheater"

 

comezi administrative: 

amx_record - faci demo
amx_recordx - opresti demo
/report - un player raporteaza un codat 

Share this post


Link to post
Share on other sites

e dragut si interesant , parerea mea, dar totusi e o problema sa ii ceri demo-ul pentru ca sigur dai de unii care nu stiu unde e, sau nu il gasesc, sau nu au unde sa til dea sau ies...

Share this post


Link to post
Share on other sites

ii exact ca amx_ss , demo-ul il gasesti in csstrike ca ss-urile , greu? daca iese ii dai ban si cand face cerere unban pe forum sa puna demo-ul

Share this post


Link to post
Share on other sites

dap, amx_record nume - porneste demo lui , si amx_recordx il opreste

Edited by Batranu Bumi

Share this post


Link to post
Share on other sites

dap, amx_record nume - porneste demo lui , si amx_recordx il opreste

 

Nu functioneaza corect ar trebui sa stii asta , ca sa functioneze corect , comanda ar trebui sa o ia din pc ul lui . Degeaba tu ii dai o initializare a unei comenzi care nu are treaba cu pc ul lui . 

 

Sincer nu am downloadat pluginul dar daca ii dai in felul urmator : 

initializare - comanda client_cmd , client_print , return , nu va functiona corect . Va avea aceleasi buguri ca amx_demorecorder .

  • Like 1

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×