Code:
#define SECONDS 10
new iSeconds
public function( )
{
iSeconds = SECONDS
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 )
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 )
iSeconds--
if( iSeconds < 1 )
{
show_hudmessage( 0, "FIGHT!!!" )
}
else
{
show_hudmessage( 0, "Seconds Remaining: %i", iSeconds )
}
}