PHP Code:
#include <amxmodx>
new Float:gfNowRunda;
#define TASKID 23456
new gcvarRoundTime;
public plugin_init()
{
register_plugin("Time","0.1","HARDBOT");
register_logevent("Start", 2, "1=Round_Start")
register_logevent("End", 2, "1=Round_End")
gcvarRoundTime = get_cvar_pointer("mp_roundtime");
}
public Start(){
set_task(1.0, "Pokaz", TASK,_, _, "b");
}
public End(){
remove_task(TASKID);
}
public Pokaz()
{
new roundtime = floatround(gfNowRunda - get_gametime(), floatround_floor);
if(roundtime > 0){
set_hudmessage(0, 160, 0, 0.0, 0.0, 0, 0.0, 1.0, 0.1, 0.1)
show_hudmessage(0, "T: %d", roundtime)
}
return PLUGIN_CONTINUE
}
This code show a hud countdown of the roundtime. I wan't to appear only in the last 30 seconds of the round .... please help. Thanks