Flood Server CS Linux

Discutii legate de instalarea, configurarea si modificarea unui server de Counter-Strike.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
LegendKiller
Membru, skill 0
Membru, skill 0
Posts: 31
Joined: 14 Apr 2008, 15:46
Detinator Steam: Da
CS Status: Bantui :)
Location: Localhost

09 Aug 2009, 22:57

Ok , am si eu o problema , pana acum am folosit cbooster , dar de vreo 2 saptamani am trecut pe dproto .Toate bune si frumoase pana cand intr-o zi vad serverul cazut . M-am gandit si am verificat ca poate o fi de la vreo harta , vreun fisier lipsa , dar nu era .
Am verificat toate logurile , dar in log-ul de la amxmodx am gasit ceva de genu :

L xx/xx/2009 - 12:50:11: [high_ping_kicker.amxx] Highpingkick: "Whip me I'm a slut!<4790><STEAM_ID_LAN>" was kicked due highping (Average Ping "102")
L xx/xx/2009 - 12:50:39: [high_ping_kicker.amxx] Highpingkick: "RapTooR<4802><STEAM_ID_LAN>" was kicked due highping (Average Ping "62")
L xx/xx/2009 - 12:51:20: [high_ping_kicker.amxx] Highpingkick: "[tB]Kucho<4806><STEAM_ID_LAN>" was kicked due highping (Average Ping "64")
L xx/xx/2009 - 12:51:25: [high_ping_kicker.amxx] Highpingkick: "Whip me I'm a slut!<4807><STEAM_ID_LAN>" was kicked due highping (Average Ping "151")
L xx/xx/2009 - 12:52:05: [high_ping_kicker.amxx] Highpingkick: "sP!tF!r3<4809><STEAM_0:0:2508398>" was kicked due highping (Average Ping "120")
L xx/xx/2009 - 12:52:28: [high_ping_kicker.amxx] Highpingkick: "Cr3eZz<4813><STEAM_ID_LAN>" was kicked due highping (Average Ping "78")
L xx/xx/2009 - 12:52:43: [high_ping_kicker.amxx] Highpingkick: "Whip me I'm a slut!<4814><STEAM_ID_LAN>" was kicked due highping (Average Ping "105")
L xx/xx/2009 - 12:52:44: [high_ping_kicker.amxx] Highpingkick: "prO elO elO<4811><STEAM_ID_LAN>" was kicked due highping (Average Ping "149")

...............
lista paote continua pana la ora 13:03:28 cand serveru a picat . Ce pot face ?
Exista vreo solutie ???


Astept raspuns
RoyalServer 2
User avatar
sn1.
Membru, skill +2
Membru, skill +2
Posts: 567
Joined: 19 May 2009, 15:24
Detinator Steam: Da
Detinator server CS: nup1k
SteamID: sn1ftw
Location: HU
Has thanked: 106 times
Been thanked: 17 times

10 Aug 2009, 00:57

Incearca sa schimbi HPK ...
LegendKiller
Membru, skill 0
Membru, skill 0
Posts: 31
Joined: 14 Apr 2008, 15:46
Detinator Steam: Da
CS Status: Bantui :)
Location: Localhost

10 Aug 2009, 01:05

Ok , am sa incerc .
PS : daca ai unu bun testat , il poti pune aici , ca la cate sunt pe forum ...
User avatar
Haledonian
Membru, skill 0
Membru, skill 0
Posts: 42
Joined: 04 Aug 2009, 19:10
Detinator Steam: Da
CS Status: Ma uit p`aici.
Reputatie: Ban 3 luni .
(Ban scos de 1 mai!)
Has thanked: 4 times

10 Aug 2009, 11:17

LegendKiller wrote:Ok , am sa incerc .
PS : daca ai unu bun testat , il poti pune aici , ca la cate sunt pe forum ...
| Afiseaza codul
/* Thanks to Notepad for helped me to write this plugin cause I can't write this plugin on a paper..
wtf are you idiot or stupid ? of course .. FUCK YOU
*/

#include <amxmodx>
#include <amxmisc>

#define PLUGIN_NAME "High PinGer Kicker"
#define PLUGIN_VERSION "2.1.1.0"
#define PLUGIN_AUTHOR "Oana"


new g_maxplayers;

new
	ping_max_cvar,
	loss_max_cvar,
	cvar_messages,
	scan_type,
	cvar_message_connected
;

public plugin_init() 
{
	register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
	
	ping_max_cvar = register_cvar("hpk_max_ping","200");
	loss_max_cvar = register_cvar("hpk_max_loss","25");
	cvar_messages = register_cvar("hpk_messages","1");
	scan_type = register_cvar("hpk_scan_type","1");
	cvar_message_connected = register_cvar("hpk_conn_message","1");
	
	g_maxplayers = get_maxplayers();
	
	
	switch(get_pcvar_num(scan_type))
	{
		case 1: set_task(1.0,"check_ping_loss_from_task",0,"",0,"b");
		
		case 2 : set_task(30.0,"check_ping_loss_from_task",0,"",0,"a",task_calcs());
	}
	
	
}


public client_putinserver(id)
{
	if(get_pcvar_num(cvar_message_connected) == 1)
	{
		client_print(id,print_chat,"Jucatorii cu ping mai mare de %d si loss mai mare de %d vor fi executati",get_pcvar_num(ping_max_cvar),get_pcvar_num(loss_max_cvar) );
	}
}

public task_calcs()
{
	new time_limit = get_cvar_num("mp_timelimit");
	
	new ret_value = time_limit / 12;
	
	return ret_value;
}
	


public check_ping_loss_from_task()
{
	
	for(new i = 1; i <= g_maxplayers; i++)
	{
		if(!is_user_connected(i))
			continue;
		
		check_ping_loss(i);
	}
	
}



/** 
Check Ping & Loss
@param index      user index
[Dezactivat] @param maxPING    ping-u maxim care poate sa-l aiba un jucator
[Dezactivat] @param maxLOSS    loss-u maxim care poate sa-l aiba un jucator
*/
public check_ping_loss(index/*,maxPING, maxLOSS*/)
{
	if(!is_user_connected(index))
		return 0;
	
	new ping,loss;
	get_user_ping(index,ping,loss);
	
	new maxPING = get_pcvar_num(ping_max_cvar);
	new maxLOSS = get_pcvar_num(loss_max_cvar);
		
	if(ping < maxPING && loss < maxLOSS)
		punish_user(index,2);
	
	else if(ping < maxPING && loss > maxLOSS)
		punish_user(index,1);
		
	else if(ping > maxPING && loss > maxLOSS) 
		punish_user(index,3);
	
	return 1;
}



/** Punish User
@param index       at who to action
@param type        type of punish   1 = kick ; 2 = ban 1 min;  3 = ban 10 min
[Dezactivat] @param messages   1 = sa fie mesaje;   0 = sa nu apara mesaje
*/
public punish_user(index, type/*, messages*/) 
{
	if(!is_user_connected(index))
		return 0;
		
	// req
	new r = random(256);
	new g = random(256);
	new b = random(256);
	
	new name = _get_name(index);
	
	switch(type)
	{
		case 1:
		{
			if(get_pcvar_num(cvar_messages) == 1)
			{
				//_hudmessage(index,"%s a primit kick pentru ca avea lossu mare",name);
				
				set_hudmessage(r,g,b, 0.07, 0.74, 0, 6.0, 6.0);
				show_hudmessage(index,"%s a primit kick pentru ca avea lossu mare",name);
				
				server_cmd("kick #%d",get_user_userid(index));
			}
			
			else
				server_cmd("kick #%d",get_user_userid(index));
		}
		
		case 2:
		{
			if(get_pcvar_num(cvar_messages) == 1)
			{
				//_hudmessage(index,"%s a primit ban 1 min pentru ca avea pingu mare",name);
				
				set_hudmessage(r,g,b, 0.07, 0.74, 0, 6.0, 6.0);
				show_hudmessage(index,"%s a primit ban 1 min pentru ca avea pingu mare",name);
				
				server_cmd("amx_banip #%d 1",get_user_userid(index));
			}
			
			else
				server_cmd("amx_banip #%d 1",get_user_userid(index));
		}
		
		case 3:
		{
			if(get_pcvar_num(cvar_messages) == 1)
			{
			
				//_hudmessage(index,"%s a primit ban 10 min pentru ca avea pingu si lossu mare",name);
				
				set_hudmessage(r,g,b, 0.07, 0.74, 0, 6.0, 6.0);
				show_hudmessage(index,"%s a primit ban 10 min pentru ca avea pingu mare",name);
					
				server_cmd("amx_banip #%d 10",get_user_userid(index));
			}
			
			else
				server_cmd("amx_banip #%d 10",get_user_userid(index));
		}
	}
	
	return 1;
}


/** cpp own ..
daca vrei mai multe detalii, intreaba-ma in privat	

void oana_hudmessage( CBaseEntity *pEntity, const hudtextparms_t &textparms, const char *pMessage )
{
	if ( !pEntity || !pEntity->IsNetClient() )
		return;

	MESSAGE_BEGIN( MSG_ONE, SVC_TEMPENTITY, NULL, pEntity->edict() );
		WRITE_BYTE( TE_TEXTMESSAGE );
		WRITE_BYTE( textparms.channel & 0xFF );

		WRITE_SHORT( FixedSigned16( textparms.x, 1<<13 ) );
		WRITE_SHORT( FixedSigned16( textparms.y, 1<<13 ) );
		WRITE_BYTE( textparms.effect );

		WRITE_BYTE( textparms.r1 );
		WRITE_BYTE( textparms.g1 );
		WRITE_BYTE( textparms.b1 );
		WRITE_BYTE( textparms.a1 );

		WRITE_BYTE( textparms.r2 );
		WRITE_BYTE( textparms.g2 );
		WRITE_BYTE( textparms.b2 );
		WRITE_BYTE( textparms.a2 );

		WRITE_SHORT( FixedUnsigned16( textparms.fadeinTime, 1<<8 ) );
		WRITE_SHORT( FixedUnsigned16( textparms.fadeoutTime, 1<<8 ) );
		WRITE_SHORT( FixedUnsigned16( textparms.holdTime, 1<<8 ) );

		if ( textparms.effect == 2 )
			WRITE_SHORT( FixedUnsigned16( textparms.fxTime, 1<<8 ) );
		
		if ( strlen( pMessage ) < 512 )
		{
			WRITE_STRING( pMessage );
		}
		else
		{
			char tmp[512];
			strncpy( tmp, pMessage, 511 );
			tmp[511] = 0;
			WRITE_STRING( tmp );
		}
	MESSAGE_END();
}*/


/**
_hudmessage
@param index 	 user index
@param message   mesaju in " "
[Dezactivat] @param r           cod-u pentru R
[Dezactivat] @param g 		cod-u pentru G
[Dezactivat] @param b		codu-u pentru B	
[Dezactivat] @param float x     coordonata x
[Dezactivat] @param float y     coordonata y
[Dezactivat] @param effects  	efecte smen...
[Dezactivat] @param float fxtime 	alt smen pentru timpu cu fx
[Dezactivat] @param float holdtime 	cat timp sa dureze mesaju
*/
public _hudmessage(index, message[]/*, r, g, b, Float:x, Float:y, effects = 0, Float:fxtime, Float:holdtime*/)
{
	new r = random(256);
	new g = random(256);
	new b = random(256);
	
	set_hudmessage(r,g,b, 0.07, 0.74, 0, 6.0, 12.0);
	show_hudmessage(index, message);
}
	
	
/**
_get_name
@param index 	user index
*/
stock _get_name(index)
{
	new name[32];
	return get_user_name(index,name,31);
}
Post Reply

Return to “Probleme la servere dedicate de Counter-Strike”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 67 guests