Absolutely abhorrid.
Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#define PLUGIN "Restart"
#define VERSION "1.0"
#define AUTHOR "Hawk552"
new Float:g_LastRestart[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /restart", "say_restart")
}
public say_restart(id)
{
new Float:Time = halflife_time()
if(Time - g_LastRestart[id] < 10.0)
return PLUGIN_HANDLED
g_LastRestart[id] = Time
server_cmd("sv_restart 1")
return PLUGIN_CONTINUE
}
Much more resource efficient.
__________________