Code:
#include <amxmodx>
#include <engine>
public check_speed(id) {
if(is_user_alive(id) && get_cvar_num("sv_speedcheck") >= 1) {
if(get_speed(id) > get_cvar_num("sv_maxspeed")) {
server_cmd("amx_slay #%d",id);
}
}
set_task(get_cvar_float("sv_speedcheckrate"),"check_speed",id);
}
public client_putinserver(id) {
set_task(get_cvar_float("sv_speedcheckrate"),"check_speed",id);
}
public client_disconnect(id) {
remove_task(id);
}
public plugin_init() {
register_plugin("Speed Slayer","0.10","Avalanche");
register_cvar("sv_speedcheck","1");
register_cvar("sv_speedcheckrate","5.0");
}
This will
theoretically work, but it hasn't been tested. sv_speedcheck (0 or 1) will turn the plugin on or off, and sv_speedcheckrate will determine the rate at which it checks.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS