View Single Post
Plugin Info:     Modification:          Category:         
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 - 845 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