Raised This Month: $51 Target: $400
 12% 

Average Ping Check


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management       
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 07-15-2009 , 20:16   Average Ping Check
Reply With Quote #1

Average Ping Check

Description:
Hello,this plugin is a type of HPK using average ping to check
avg_ping = totalping / totalplayer + MaxPingGap
If player ping over avg_ping two times,he will get kick

Here is a simple:

Aplayer ping 10
Bplayer ping 15
Cplayer ping 30
Dplayer ping 85

//get totalping
A+B+C+D = 140

//get avg_ping = totalping / totalplayer
140 / 4 = 35

//avg_ping+MaxPingGap
35+50 = 85

//Check Player Ping
Dplayer ping is 85,so he will get a warning
if Dplayer continuous 2times over,he will get kick

Cvars:

n/a

Change the define to set
PHP Code:
#define MaxPingGap 50 
PHP Code:
#define FLAG_ADMIN ADMIN_KICK 
Sorry for my poor english
Attached Files
File Type: sma Get Plugin or Get Source (pingcheck.sma - 836 views - 1.5 KB)
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!

Last edited by biscuit628; 07-15-2009 at 20:44.
biscuit628 is offline
Bend3R
Veteran Member
Join Date: Oct 2004
Location: Sweden (Stockholm)
Old 07-15-2009 , 20:57   Re: Average Ping Check
Reply With Quote #2

What's wrong with the original HPK?
Bend3R is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 07-16-2009 , 05:34   Re: Average Ping Check
Reply With Quote #3

PHP Code:
public client_putinserver(id)
{
    
joined[id] = false
    set_task
(5.0,"is_user_join",id)
}

public 
is_user_join(id)
{
    if(
is_user_connected(id))
        
joined[id] = true

->

PHP Code:
public client_putinserver(id)
{
    
joined[id] = true;
}

public 
client_disconnect(id)
{
    
joined[id] = false;

__________________
xPaw is offline
SchlumPF*
Veteran Member
Join Date: Mar 2007
Old 07-16-2009 , 05:58   Re: Average Ping Check
Reply With Quote #4

crap, asap someones ping is fluctuating he starts lagging and as such he should fix his/her ping or leave the server. another annoying case is ppl using lowrates like 20/20/3500.
__________________
SchlumPF* is offline
Send a message via ICQ to SchlumPF*
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 07-16-2009 , 06:23   Re: Average Ping Check
Reply With Quote #5

Quote:
Originally Posted by xPaw View Post
PHP Code:
public client_putinserver(id)
{
    
joined[id] = false
    set_task
(5.0,"is_user_join",id)
}

public 
is_user_join(id)
{
    if(
is_user_connected(id))
        
joined[id] = true

->

PHP Code:
public client_putinserver(id)
{
    
joined[id] = true;
}

public 
client_disconnect(id)
{
    
joined[id] = false;

it's the delay for checking
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!
biscuit628 is offline
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 07-16-2009 , 13:01   Re: Average Ping Check
Reply With Quote #6

Quote:
Originally Posted by Bend3R View Post
What's wrong with the original HPK?
sometimes the original hpk will kick everyone,because of server is unsettled network,everyone become high ping and get kick

using average ping to check can fix this problem
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!
biscuit628 is offline
Gizmo
Senior Member
Join Date: May 2006
Location: Sweden
Old 07-16-2009 , 15:02   Re: Average Ping Check
Reply With Quote #7

I made a average high ping kicker that checks the average ping on every single player and kicks them for high average ping over 10 checks, that plugin got unapproved since the approvers did not think it was useful.

http://forums.alliedmods.net/showthread.php?t=68851
__________________
Gizmo is offline
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 07-16-2009 , 15:08   Re: Average Ping Check
Reply With Quote #8

Quote:
Originally Posted by Gizmo View Post
I made a average high ping kicker that checks the average ping on every single player and kicks them for high average ping over 10 checks, that plugin got unapproved since the approvers did not think it was useful.

http://forums.alliedmods.net/showthread.php?t=68851
omg
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!
biscuit628 is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 07-16-2009 , 15:17   Re: Average Ping Check
Reply With Quote #9

Sorry but, a concept similar but better than yours already exist.

http://forums.alliedmods.net/showthread.php?t=83192
__________________
joaquimandrade is offline
avril-lavigne
Banned
Join Date: Apr 2009
Old 07-18-2009 , 07:08   Re: Average Ping Check
Reply With Quote #10

im using HPK with "ultimate executor [ maxplayers ,frags,deaths ]
pfd_players 10 "amx_hpk 130 2 3 1 1 " "amx_hpk .... new value"
i can set it for any maxplayers ....
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc
avril-lavigne is offline
Reply



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:31.


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