/* AMX Mod script. * * (c) 2002-2003, OLO * modified by shadow * This file is provided as is (no warranties). * * Players with immunity won't be checked */ #include #include new g_Ping[33] new g_Samples[33] public plugin_init() { register_plugin("High Ping Kicker (Steam)","0.16.2","OLO/shadow") register_concmd("amx_hpk","cmdHpk",ADMIN_KICK,"- configures high_ping_kicker plugin") register_cvar("amx_hpk_ping","110") register_cvar("amx_hpk_check","15") register_cvar("amx_hpk_tests","8") register_cvar("amx_hpk_delay","60") if ( get_cvar_num( "amx_hpk_check" ) < 5 ) set_cvar_num( "amx_hpk_check" , 5 ) if ( get_cvar_num( "amx_hpk_tests" ) < 3 ) set_cvar_num( "amx_hpk_tests" , 3 ) } public client_disconnect(id) remove_task( id ) public client_putinserver(id) { g_Ping[id] = 0 g_Samples[id] = 0 if ( !is_user_bot(id) ) { new param[1] param[0] = id set_task( 10.0 , "showWarn" , id , param , 1 ) if (get_cvar_num("amx_hpk_tests") != 0) { set_task( float(get_cvar_num("amx_hpk_delay")), "taskSetting", id, param , 1) } else { set_task( float(get_cvar_num( "amx_hpk_tests" )) , "checkPing" , id , param , 1 , "b" ) } } } public showWarn(param[]) client_print( param[0] ,print_chat,"", get_cvar_num( "amx_hpk_ping" ) ) public taskSetting(param[]) { new name[32] get_user_name(param[0],name,31) set_task( float(get_cvar_num( "amx_hpk_tests" )) , "checkPing" , param[0] , param , 1 , "b" ) } stock kickPlayer( id ) { new name[32],authid[32] get_user_name(id,name,31) get_user_authid(id,authid,31) client_print(0,print_chat,"",name) //14:05:50 Uzycie: amx_ban