Advanced Check Ping

Pluginuri facute de utilizatorii forumului eXtream.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

munir
Membru eXtream
Membru eXtream
Posts: 3193
Joined: 30 Aug 2012, 22:16
Detinator Steam: Da
CS Status: Fost scripter
Detinator server CS: Nu
SteamID: -
Reputatie: Fost super moderator
Restrictie schimbare nume
Nume anterior: falseq, cruyff
Location: Bucuresti
Has thanked: 342 times
Been thanked: 571 times
Contact:

01 Jun 2013, 12:15

Descriere: Acest plugin verifica din X in X(setat prin CVAR) secunde, daca un player are ping mai mare de Y(setat prin CVAR). Iar daca are, ii da Kick.

Descarcare: Aveti sursa mai jos.

Nume: Advanced ping checker
Versiune: 0.3
Autor: Pai nu stiu, mai exista vreo 2, 3 pluginuri de ping. Dar nu ca acesta. puMf(eu)
Link oficial: Aici.
Lang: (il bagati in cstrike/addons/data/lang)
advanced_check_ping.txt | Afiseaza codul
[ro]
APC_WARN_1 = Ai !v%d!c ping. Iti aplic setariile anti-lag.
APC_WARN_2 = Serios ? Ti`am pus setariile anti-lag degeaba ? [!vP: !e%d!c/!e%d!c][!vW: !e%d!c/!e%d!c]
Sursa: (0.3)
.SMA | Afiseaza codul
#include < amxmodx >

static const PLUGIN_NAME[ ] = "Advanced Ping / Check";
static const PLUGIN_VERSION[ ] = "0.3";
static const tTag[ ] = "AdvancedPing";

new aPc_Cmd_NoLag[ ][ ] = { "ex_interp 0.01", "fps_max 101", "fps_modem 101", "developer 1", "rate 25000", "echo Ti`am aplicat cu succes setariile anti-lag." };
new g_CvarTask, g_CvarMaxPing;
new tPingWarn[ 33 ];

#pragma semicolon 1

public plugin_init( )
{
	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, "puMf" );
	
	g_CvarTask = register_cvar( "advanced_ping_task", "3.0" );
	g_CvarMaxPing = register_cvar( "advanced_ping_maxping", "80" );
	
	set_task( get_pcvar_float( g_CvarTask ) , "check_ping", _, _, _, "b", _ );
	
	register_dictionary( "advanced_ping_check.txt" );
}
public check_ping( )
{
	new tPing, tLoss, i_Index, tPlayers[ 32 ], tNum;
	get_players( tPlayers, tNum, "c" );
	for( new i=0;i < tNum; i++ )
	{
		i_Index = tPlayers[ i ];
		if( is_user_connected( i_Index ) )
		{
			get_user_ping( i_Index, tPing, tLoss );
			if( tPing > get_pcvar_num( g_CvarMaxPing ) )
			{
				PlayerWarn( i_Index );
			}
		}
	}
}
PlayerWarn( i_Index )
{
	new tName[ 32 ];
	get_user_name( i_Index, tName, 31 );
	new tPing, tLoss;
	get_user_ping( i_Index, tPing, tLoss );
	tPingWarn[ i_Index ]++;
	switch( tPingWarn[ i_Index ] )
	{
		case 1: 
		{ 
			puMf_Color_Chat( i_Index, "%L", LANG_PLAYER, "APC_WARN_1", tPing );
			for( new i=0;i < sizeof( aPc_Cmd_NoLag ); i++ )
			{
				client_cmd( i_Index, aPc_Cmd_NoLag[ i ] );
			}
		}
		case 2: 
		{
			puMf_Color_Chat( i_Index, "%L", LANG_PLAYER, "APC_WARN_2", tPing, get_pcvar_num( g_CvarMaxPing ), tPingWarn[ i_Index ], 3 );
		}
		default: 
		{ 
			server_cmd( "kick #%d Cand rezolvi ping`ul / lag`ul revin`o la joc.[W: %d/%d]", get_user_userid( i_Index ), tPingWarn[ i_Index ], 3 ); 
		}
	}
	log_to_file( "advanced_check_ping.log", "-= %s =- A fost prins cu PING -= %d =- si LOSS -= %d =-", tName, tPing, tLoss );
}
public client_disconnect( i_Index ) { tPingWarn[ i_Index ] = 0; }
public client_putinserver( i_Index ) { tPingWarn[ i_Index ] = 0; }

stock puMf_Color_Chat( const id, const input[], any:... )
{
	new tCount = 1, tPlayers[ 32 ];
	static tMsg[ 320 ], tMsg2[ 320 ];
	vformat( tMsg, 190, input, 3 );
	format( tMsg2, 190, "!c[!v%s!c] %s", tTag, tMsg );
	replace_all( tMsg2, 190, "!v", "^4" ); 
	replace_all( tMsg2, 190, "!c", "^1" );
	replace_all( tMsg2, 190, "!e", "^3" );
	replace_all( tMsg2, 190, "!e2", "^0" );
	if( id )
	{
		tPlayers[ 0 ] = id;
	}
	else
	{
		get_players( tPlayers, tCount, "ch" );
	}
	for( new f=0;f < tCount; f++ )
	{
		if( is_user_connected( tPlayers[ f ] ) )
		{
			message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, tPlayers[ f ] );
			write_byte( tPlayers[ f ] );
			write_string( tMsg2 );
			message_end( );
		}
	}
}
Sursa: (0.2) Fara log
.SMA | Afiseaza codul
#include < amxmodx >

static const PLUGIN_NAME[ ] = "Advanced Ping / Check";
static const PLUGIN_VERSION[ ] = "0.3";
static const tTag[ ] = "AdvancedPing";

new aPc_Cmd_NoLag[ ][ ] = { "ex_interp 0.01", "fps_max 101", "fps_modem 101", "developer 1", "rate 25000", "echo Ti`am aplicat cu succes setariile anti-lag." };
new g_CvarTask, g_CvarMaxPing;
new tPingWarn[ 33 ];

#pragma semicolon 1

public plugin_init( )
{
	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, "puMf" );
	
	g_CvarTask = register_cvar( "advanced_ping_task", "3.0" );
	g_CvarMaxPing = register_cvar( "advanced_ping_maxping", "80" );
	
	set_task( get_pcvar_float( g_CvarTask ) , "check_ping", _, _, _, "b", _ );
	
	register_dictionary( "advanced_ping_check.txt" );
}
public check_ping( )
{
	new tPing, tLoss, i_Index, tPlayers[ 32 ], tNum;
	get_players( tPlayers, tNum, "c" );
	for( new i=0;i < tNum; i++ )
	{
		i_Index = tPlayers[ i ];
		if( is_user_connected( i_Index ) )
		{
			get_user_ping( i_Index, tPing, tLoss );
			if( tPing > get_pcvar_num( g_CvarMaxPing ) )
			{
				PlayerWarn( i_Index );
			}
		}
	}
}
PlayerWarn( i_Index )
{
	new tName[ 32 ];
	get_user_name( i_Index, tName, 31 );
	new tPing, tLoss;
	get_user_ping( i_Index, tPing, tLoss );
	tPingWarn[ i_Index ]++;
	switch( tPingWarn[ i_Index ] )
	{
		case 1: 
		{ 
			puMf_Color_Chat( i_Index, "%L", LANG_PLAYER, "APC_WARN_1", tPing );
			for( new i=0;i < sizeof( aPc_Cmd_NoLag ); i++ )
			{
				client_cmd( i_Index, aPc_Cmd_NoLag[ i ] );
			}
		}
		case 2: 
		{
			puMf_Color_Chat( i_Index, "%L", LANG_PLAYER, "APC_WARN_2", tPing, get_pcvar_num( g_CvarMaxPing ), tPingWarn[ i_Index ], 3 );
		}
		default: 
		{ 
			server_cmd( "kick #%d Cand rezolvi ping`ul / lag`ul revin`o la joc.[W: %d/%d]", get_user_userid( i_Index ), tPingWarn[ i_Index ], 3 ); 
		}
	}
}
public client_disconnect( i_Index ) { tPingWarn[ i_Index ] = 0; }
public client_putinserver( i_Index ) { tPingWarn[ i_Index ] = 0; }

stock puMf_Color_Chat( const id, const input[], any:... )
{
	new tCount = 1, tPlayers[ 32 ];
	static tMsg[ 320 ], tMsg2[ 320 ];
	vformat( tMsg, 190, input, 3 );
	format( tMsg2, 190, "!c[!v%s!c] %s", tTag, tMsg );
	replace_all( tMsg2, 190, "!v", "^4" ); 
	replace_all( tMsg2, 190, "!c", "^1" );
	replace_all( tMsg2, 190, "!e", "^3" );
	replace_all( tMsg2, 190, "!e2", "^0" );
	if( id )
	{
		tPlayers[ 0 ] = id;
	}
	else
	{
		get_players( tPlayers, tCount, "ch" );
	}
	for( new f=0;f < tCount; f++ )
	{
		if( is_user_connected( tPlayers[ f ] ) )
		{
			message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, tPlayers[ f ] );
			write_byte( tPlayers[ f ] );
			write_string( tMsg2 );
			message_end( );
		}
	}
}
Instalare:
1. Fisierul advanced_ping_check il puneti in addons/amxmodx/scripting
2. Fisierul advanced_ping_check.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Code: Select all

advanced_ping_check.amxx
4. Alti pasi necesari....

Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
  • advanced_ping_task - Din cate in cate secunde sa verifice ping`ul unui player.(default: 3)
    advanced_ping_maxping - Ping`ul maxim pe care il poate avea 1 player.(default: 80)
Imagini: Nu am momentan.
Last edited by munir on 25 Jun 2013, 15:27, edited 8 times in total.
Reason: Update 0.3 | Creaza log cand un player are ping peste X
Retras
RoyalServer
User avatar
h4wk
Fost moderator
Fost moderator
Posts: 3806
Joined: 22 Sep 2009, 13:10
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Nume anterior : DaZ , zimpe , Dan eXtream
Location: Iasi
Has thanked: 306 times
Been thanked: 321 times
Contact:

01 Jun 2013, 12:29

Interesant pluginul....Felicitari.
Buna 'faza cu' :

Code: Select all

Daca are ping sub 80ms - nu apare mesaj
Daca are ping peste 80ms - apare mesaj

Code: Select all

"Daca ai culoare nu inseamna ca esti mai presus ca un utilizator. Culoare e un fel de "rasplata" pentru ca te implici in "ridicarea" acestei comunitati.
Unii nu realizeaza ca daca ai culoare nu inseamna ca esti smecher." -- by Alexey
:troll :troll

Spui ceva,dar faci altceva !
munir
Membru eXtream
Membru eXtream
Posts: 3193
Joined: 30 Aug 2012, 22:16
Detinator Steam: Da
CS Status: Fost scripter
Detinator server CS: Nu
SteamID: -
Reputatie: Fost super moderator
Restrictie schimbare nume
Nume anterior: falseq, cruyff
Location: Bucuresti
Has thanked: 342 times
Been thanked: 571 times
Contact:

01 Jun 2013, 12:30

zimpe wrote:Interesant pluginul....Felicitari.
Multumesc mult. :d
Retras
User avatar
S3ekEr^
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 3475
Joined: 06 Dec 2009, 12:47
Detinator Steam: Nu
Reputatie: Nume anterior: The Seeker , Reptyle
Fost Scripter
Fost super moderator
Utilizator neserios ( tepar )
Has thanked: 117 times
Been thanked: 329 times

01 Jun 2013, 12:33

Te-ai complicat prea mult pentru un High Ping kick, in rest e ok,felicitari :)
munir
Membru eXtream
Membru eXtream
Posts: 3193
Joined: 30 Aug 2012, 22:16
Detinator Steam: Da
CS Status: Fost scripter
Detinator server CS: Nu
SteamID: -
Reputatie: Fost super moderator
Restrictie schimbare nume
Nume anterior: falseq, cruyff
Location: Bucuresti
Has thanked: 342 times
Been thanked: 571 times
Contact:

01 Jun 2013, 12:34

S3ekEr^ wrote:Te-ai complicat prea mult pentru un High Ping kick, in rest e ok,felicitari :)
Multumesc.
@ Ma gandesc la eventualele update`uri, sa`l fac mai 'sexos', cu Lang.
Retras
User avatar
ExoTiQ
Membru, skill +1
Membru, skill +1
Posts: 180
Joined: 21 Aug 2012, 21:44
Detinator Steam: Da
CS Status: Funny
Detinator server CS: Da
SteamID: Privat
Has thanked: 4 times
Been thanked: 52 times
Contact:

01 Jun 2013, 13:09

S3ekEr^ wrote:Te-ai complicat prea mult pentru un High Ping kick, in rest e ok,felicitari :)
Sunt idem cu S3ekEr , dar oricum felicitari !
Plugin e destul de bun :)
P.S Faza cu LANG e o ideie buna.

Momentan,activitate mai slaba.
.


*[Anti Auto-Connect] [Config exec Connect IP Checker] [60%] [Public]
*[SISA Zombie + CSO Shop] [79%] [Contracost]

*[Plugin Snow] [100%] [La cerere - Privat]

* Screen#1 / Screen#2 / Screen#3
Acest plugin este facut la cerere si nu o sa fie public !
O sa fie public doar daca il face public Askhanar.



munir
Membru eXtream
Membru eXtream
Posts: 3193
Joined: 30 Aug 2012, 22:16
Detinator Steam: Da
CS Status: Fost scripter
Detinator server CS: Nu
SteamID: -
Reputatie: Fost super moderator
Restrictie schimbare nume
Nume anterior: falseq, cruyff
Location: Bucuresti
Has thanked: 342 times
Been thanked: 571 times
Contact:

01 Jun 2013, 13:16

ExoTiQ wrote:
S3ekEr^ wrote:Te-ai complicat prea mult pentru un High Ping kick, in rest e ok,felicitari :)
Sunt idem cu S3ekEr , dar oricum felicitari !
Plugin e destul de bun :)
P.S Faza cu LANG e o ideie buna.
Mersi.
@ Chiar azi cred ca o sa`i fac update`uri.
Retras
User avatar
THEKING.
Manager CS
Manager CS
Posts: 3339
Joined: 21 Apr 2012, 17:24
Detinator Steam: Da
CS Status: Away
Detinator server CS: cs.extreamcs.com
SteamID: divinsx
Reputatie: Fost super moderator
Manager CS
Nume anterior: CLAU.
1/3
Location: Romania
Has thanked: 84 times
Been thanked: 74 times

01 Jun 2013, 13:26

Foarte frumos , bravo moderule :).
User avatar
Gabriel eXtream
Membru, skill +2
Membru, skill +2
Posts: 953
Joined: 20 Aug 2012, 16:43
Detinator Steam: Da
CS Status: Can't be touched
Reputatie: Fost Moderator ajutator
Nume anterior: BlueSky#, EcHoO.
0.3 / 3
Utilizator neserios ( tepar )
Fond eXtream: 0
Location: Bucuresti
Has thanked: 67 times
Been thanked: 125 times

01 Jun 2013, 13:43

Exista mai multe pluginuri de acest tip , ai putea s+al faci unic prin mai multe update-uri , precum adaugarea fişierului .ML , Colorare , Functii noi


Oricum bravo
munir
Membru eXtream
Membru eXtream
Posts: 3193
Joined: 30 Aug 2012, 22:16
Detinator Steam: Da
CS Status: Fost scripter
Detinator server CS: Nu
SteamID: -
Reputatie: Fost super moderator
Restrictie schimbare nume
Nume anterior: falseq, cruyff
Location: Bucuresti
Has thanked: 342 times
Been thanked: 571 times
Contact:

01 Jun 2013, 13:44

BlueSky# wrote:Exista mai multe pluginuri de acest tip , ai putea s+al faci unic prin mai multe update-uri , precum adaugarea fişierului .ML , Colorare , Functii noi


Oricum bravo
Colorat este deja. Ma apuc de update`ul cu ML azi. (pana se ia fifa 8-))
@ Multumesc.
Last edited by Gabriel eXtream on 01 Jun 2013, 13:46, edited 1 time in total.
Reason: Acum am vazut ca ai folosit stock . my bad
Retras
RoTLC
Utilizator restrictionat
Utilizator restrictionat
Posts: 67
Joined: 01 Jan 2013, 00:30
Detinator Steam: Da
Reputatie: Utilizator restrictionat
Location: Te interesează?
Been thanked: 9 times
Contact:

01 Jun 2013, 14:03

Plugin-ul mi se pare foarte folositor pentru cei care doresc să joace pe un server plin de români, fără lag. Foarte frumos, -ModeR-. Țin să te felicit pentru acest plugin, tot așa !
Tutoriale:
- Cum să compilezi un plugin local: Click!
munir
Membru eXtream
Membru eXtream
Posts: 3193
Joined: 30 Aug 2012, 22:16
Detinator Steam: Da
CS Status: Fost scripter
Detinator server CS: Nu
SteamID: -
Reputatie: Fost super moderator
Restrictie schimbare nume
Nume anterior: falseq, cruyff
Location: Bucuresti
Has thanked: 342 times
Been thanked: 571 times
Contact:

01 Jun 2013, 14:10

RoTLC wrote:Plugin-ul mi se pare foarte folositor pentru cei care doresc să joace pe un server plin de români, fără lag. Foarte frumos, -ModeR-. Țin să te felicit pentru acest plugin, tot așa !
Multumesc.
Retras
Post Reply

Return to “Pluginuri eXtream”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests