This plugin simply does a auto-restart after a defined amount of time. The restart occurs AFTER game commencing (both teams got players first).
This is usefull to prevent fast-connectors get easy and fast money for the 2nd round. So nearly everyone will be forced to play the pistolround on public-servers.
Code:
#include <amxmodx>
public restart_time()
set_task (get_cvar_float("amx_autorestart"),"restart_map",0)
public restart_map() {
set_hudmessage(0, 100, 200, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2)
show_hudmessage(0,"[AMXX] Automatic Round-Restart!")
set_cvar_float("sv_restart",2.0)
return PLUGIN_HANDLED
}
public plugin_init() {
register_plugin("Auto-Restart","1.00","ToT | V!PER")
register_event("TextMsg","restart_time","a","2&#Game_C")
register_cvar("amx_autorestart","20.0")
return PLUGIN_CONTINUE
}