07-28-2024, 11:19 PM
This is a simple plugin kicking everyone from the server with ping above 350. You can change that value to whatever you like.
Code:
#include <amxmodx>
#include <engine>
public plugin_init()
{
register_plugin("Ping", "1.0", "sToP !")
set_task(60.0, "check_ping", _, _, _, "b")
}
public check_ping()
{
for(new id = 1; id <= get_playersnum(); id++)
{
new ping, loss
get_user_ping(id,ping, loss)
if( ping > 350)
{
client_print(id, print_console, "[HL.DM20.NET] You were kicked because you have ping over 350!")
client_cmd(id, "disconnect")
}
}
return PLUGIN_CONTINUE
}