Quote:
Originally Posted by edon1337
Show the full code, most likely the player id is in the function parameters.
|
They aren't in the parameters:
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /thetime","The_time",0,"Arata ora")
register_clcmd("say_team /thetime","The_time",0,"Arata ora")
register_clcmd("say /timeleft","Timeleft",0,"Arata timpul ramas")
register_clcmd("say_team /timeleft","Timeleft",0,"Arata timpul ramas")
}
public The_time()
{
if(task_exists(1))
remove_task(1)
else
set_task(1.0,"the_time",1,_,_,"b",_)
}
public Timeleft()
{
if(task_exists(2))
remove_task(2)
else
set_task(1.0,"timeleft",2,_,_,"b",_)
}
public the_time()
{
static time[33]
get_time("%H:%M:%S",time,32)
set_hudmessage(255, 0, 0, 0.95, 0.01, 0, 0.1, 0.9, 0.1, 0.1, -1)
show_hudmessage(0 , "Time: %s ",time)
}
public timeleft()
{
static timeleft
timeleft = get_timeleft()
set_hudmessage(255, 0, 0, 0.95, 0.03, 0, 0.1, 0.9, 0.1, 0.1, -1)
show_hudmessage(0 , "Timeleft: %d:%02d ",timeleft / 60, timeleft % 60)
}
Should I add them as parameters then use them in the show_hudmessage(id,message) instead of the 0 ?