PHP Code:
#include <amxmodx>
#define Gamestarttime 20
public downtime(){
client_print(0, print_center, "%d Seconds Until Gamestart..", Gamestarttime)
Gamestarttime--
if(Gamestarttime<0)
restart_map()
else
set_task(1.0, "downtime")
return PLUGIN_HANDLED
}
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,"Game will start after restart 3 times!")
set_cvar_num("mp_friendlyfire",0)
set_cvar_num("sv_maxspeed",0)
server_cmd("amx_restart3times")
return PLUGIN_HANDLED
}
public plugin_init() {
register_plugin("Auto-Restart","1.00","Test")
register_event("TextMsg","downtime","a","2&#Game_C")
return PLUGIN_CONTINUE
}
Cannot compile..
Please fix my code..