:/ is this clean code or do i have to work on it a little?
Code:
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 because of immunity..")
return PLUGIN_CONTINUE
}
new ping, l
get_user_ping(id, ping, l)
if (ping < ping_max)
++numtests[id]
else
if (numtests[id] > 0) --numtests[id]
if (numtests[id] > ping_times)
kickPlayer(id)
return PLUGIN_CONTINUE
}
(sample from my high ping kicker)