Well, I would like to do this thing. When I set task, I want that hudmessage appears as long as task is running. But, there should be a counter which counts like 15,14,13...3,2,1 untill task finished. How can I do this?
Code is below, alter it please:
Code:
#include <amxmodx>
#include <fun>
public plugin_init()
{
register_plugin("Hudmessage with task","dunno","LynX")
register_clcmd("hudmessage","hudmessage1")
return PLUGIN_HANDLED
}
public hudmessage1(id)
{
//I will put some stuff here later
set_hudmessage(200,0,0, 0.03, 0.76, 2, 0.02, 1.0, 0.01, 0.1, 2)
show_hudmessage(id,"Task finishes in <countdownthinghere> ")
set_task(15, "hudmessage2",id)
return PLUGIN_HANDLED
}
public hudmessage2(id)
{
//I will remove stuff here
return PLUGIN_HANDLED
}
Thanks.
LynX
__________________