PHP Code:
#include <amxmodx>
#include <amxmisc>
new pcvar, amount
public plugin_init()
{
register_plugin("Restart @ Commencing", "1.0", "Atomen")
register_event("TextMsg", "event_game_commencing", "a", "2&#Game_C")
pcvar = register_cvar("amx_commencing", "1")
amount = 10
}
public event_game_commencing()
{
if(pcvar)
set_task(1.0, "delayed_output", _, _, _, "a", 10)
}
public delayed_output()
{
if(amount == 1)
{
set_task( 1.0, "cmdTest" )
}
else
{
set_hudmessage( 255, 255, 255, -1.0, 0.35, 0, 6.0, 0.8, 0.1, 0.1, 4)
show_hudmessage(0, "Time Left Until Restart : %d", amount)
amount--
}
}
public cmdTest()
{
server_cmd( "sv_restart 1" )
}
__________________