Code:
#include <amxmodx>
#define TASKID 1996
#define SECONDS 10
new iSeconds
public plugin_init()
{
register_plugin( "Countdown Example", "1.0", "Wrecked" )
register_logevent( "LogEventRoundStart", 2, "1=Round_Start" )
}
public LogEventRoundStart()
{
if( task_exists( TASKID ) )
remove_task( TASKID )
iSeconds = SECONDS
set_task( 1.0, "TaskShowCountdown", TASKID, _, _, "a", SECONDS )
}
public TaskShowCountdown()
{
set_hudmessage( 120, 120, 120, 0.50, 0.50, 0, 0.1, 0.8, 0.1, 0.1, -1 )
show_hudmessage( 0, "Seconds Remaining: %i", iSeconds-- )
}