Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ping Kicker
#1
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
}
Reply


Messages In This Thread
Ping Kicker - by marcudaniel1337 - 07-28-2024, 11:19 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)