Raised This Month: $ Target: $400
 0% 

High Ping Banner


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fyndler
Senior Member
Join Date: Nov 2007
Old 11-03-2008 , 12:31   High Ping Banner
Reply With Quote #1

Hi

Is there any plugin just like the high ping kicker but ban instead ?

Starts to get ennoying that people only reconnect when they have 300 ping :O

So its there any high ping banner you got banned for like 10 minutes its enough

Searched only found 3 or 4 high ping kicker

+karma for help
__________________
fyndler is offline
Sofeltis
Member
Join Date: Nov 2007
Old 11-03-2008 , 16:50   Re: High Ping Banner
Reply With Quote #2

Code:
#include <amxmodx>

new HIGHPING_MAX = 200 // set maximal acceptable ping
new HIGHPING_TIME = 15  // set in seconds frequency of ping checking
new HIGHPING_TESTS = 4  // minimal number of checks before doing anything

new iNumTests[33]

public plugin_init() {
	register_plugin("High Ping Banner","1.0","Plugin source by 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("amx_banip 5 #%d too high ping", uID)
	client_cmd(id, "echo ^"[HPK] Sorry but your ping is too high!^"; disconnect")
	client_print(0, print_chat, "[HPK] %s has been banned for 5 minutes due to high ping!", name)
	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, "[HPK] 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, "[HPK] Players with ping higher than %dms will be banned for 5 minutes!", HIGHPING_MAX)
	set_task(float(HIGHPING_TIME), "checkPing", param[0], param, 1, "b")
	return PLUGIN_CONTINUE
}
try this ;)
__________________
Sofeltis is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 11-03-2008 , 22:13   Re: High Ping Banner
Reply With Quote #3

Quote:
Originally Posted by Sofeltis View Post
Code:
#include <amxmodx>
 
new HIGHPING_MAX = 200 // set maximal acceptable ping
new HIGHPING_TIME = 15  // set in seconds frequency of ping checking
new HIGHPING_TESTS = 4  // minimal number of checks before doing anything
 
new iNumTests[33]
 
public plugin_init() {
    register_plugin("High Ping Banner","1.0","Plugin source by 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("amx_banip 5 #%d too high ping", uID)
    client_cmd(id, "echo ^"[HPK] Sorry but your ping is too high!^"; disconnect")
    client_print(0, print_chat, "[HPK] %s has been banned for 5 minutes due to high ping!", name)
    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, "[HPK] 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, "[HPK] Players with ping higher than %dms will be banned for 5 minutes!", HIGHPING_MAX)
    set_task(float(HIGHPING_TIME), "checkPing", param[0], param, 1, "b")
    return PLUGIN_CONTINUE
}
try this ;)
HPK or HPB ?

High Ping Kicker
High Ping Banner
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
{PHILMAGROIN}
Senior Member
Join Date: Aug 2007
Location: In the middle of the des
Old 11-03-2008 , 22:59   Re: High Ping Banner
Reply With Quote #4

Quote:
Originally Posted by #8 SickneSS View Post
HPK or HPB ?

High Ping Kicker
High Ping Banner
Code:
server_cmd("amx_banip 5 #%d too high ping", uID)
__________________
[B]
{PHILMAGROIN} is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 11-04-2008 , 05:03   Re: High Ping Banner
Reply With Quote #5

Quote:
[HPK] Sorry but your ping is too high!
This Plugin Is High ping Banner not Kicker

[HPB] Sorry but your ping is too high! (Y) =D
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
fyndler
Senior Member
Join Date: Nov 2007
Old 11-04-2008 , 13:38   Re: High Ping Banner
Reply With Quote #6

Quote:
Originally Posted by Sofeltis View Post
Code:
#include <amxmodx>

new HIGHPING_MAX = 200 // set maximal acceptable ping
new HIGHPING_TIME = 15  // set in seconds frequency of ping checking
new HIGHPING_TESTS = 4  // minimal number of checks before doing anything

new iNumTests[33]

public plugin_init() {
    register_plugin("High Ping Banner","1.0","Plugin source by 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("amx_banip 5 #%d too high ping", uID)
    client_cmd(id, "echo ^"[HPK] Sorry but your ping is too high!^"; disconnect")
    client_print(0, print_chat, "[HPK] %s has been banned for 5 minutes due to high ping!", name)
    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, "[HPK] 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, "[HPK] Players with ping higher than %dms will be banned for 5 minutes!", HIGHPING_MAX)
    set_task(float(HIGHPING_TIME), "checkPing", param[0], param, 1, "b")
    return PLUGIN_CONTINUE
}
try this ;)

Ok will try hope it works
__________________
fyndler 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 07:02.


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