Raised This Month: $ Target: $400
 0% 

Edit on HPK *high ping kicker*


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management       
Sav
Junior Member
Join Date: Dec 2006
Old 12-31-2006 , 15:58   Edit on HPK *high ping kicker*
Reply With Quote #1

Hey guys this was already made and i figured i would change just a few things so im not sure who made this but
Credits go to you not me so no one try to say wow nice..
i havent tested but only changed a few things..
the old code was banning the people and not kicking and a few people were asking me on my server if i could change it. well here it is
it will kick not ban
and
instead of saying
=NcB= sav has been kicked due to high ping
it will say
STEAM_0_***** has been kicked due to high ping.

my first edit on a plugin that i have posted so let me know if it works
Code:
#include <amxmodx> new HIGHPING_MAX = 260 // set maximal acceptable ping new HIGHPING_TIME = 20 // set in seconds frequency of ping checking new HIGHPING_TESTS = 2 // minimal number of checks before doing anything new iNumTests[33] public plugin_init() { register_plugin("High Ping Kicker","1.2.0","DynAstY") if (HIGHPING_TIME < 15) HIGHPING_TIME = 15 if (HIGHPING_TESTS < 4) HIGHPING_TESTS = 4 return PLUGIN_CONTINUE } public client_disconnect(id) { remove_task(id) return PLUGIN_CONTINUE } public client_putinserver(id) { iNumTests[id] = 0 if (!is_user_bot(id)) { new param[1] param[0] = id set_task(30.0, "showWarn", id, param, 1) } return PLUGIN_CONTINUE } kickPlayer(id) { new name[32] get_user_name(id, name, 31) new uID = get_user_userid(id) server_cmd("kick 1 #%d", uID) client_cmd(id, "echo ^"Your ping is to high sorry come back latter.^"; disconnect") client_print(0, print_chat, "[HPK] %s was disconnected due to high ping!", id) return PLUGIN_CONTINUE } public checkPing(param[]) { new id = param[0] if ((get_user_flags(id) & ADMIN_IMMUNITY) || (get_user_flags(id) & ADMIN_RESERVATION)) { remove_task(id) client_print(id, print_chat, "Ping checking disabled due to immunity...") return PLUGIN_CONTINUE } new p, l get_user_ping(id, p, l) if (p > HIGHPING_MAX) ++iNumTests[id] else if (iNumTests[id] > 0) --iNumTests[id] if (iNumTests[id] > HIGHPING_TESTS) kickPlayer(id) return PLUGIN_CONTINUE } public showWarn(param[]) { client_print(param[0], print_chat, "Players with ping higher than %dms will be kicked!", HIGHPING_MAX) set_task(float(HIGHPING_TIME), "checkPing", param[0], param, 1, "b") return PLUGIN_CONTINUE }
Attached Files
File Type: sma Get Plugin or Get Source (High_Ping_kicker.sma - 194 views - 1.7 KB)
File Type: amxx HighPingKicker.amxx (3.6 KB, 294 views)
Sav is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 12-31-2006 , 16:04   Re: Edit on HPK *high ping kicker*
Reply With Quote #2

I'm not even going to start.

Unapproved.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 09:31.


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