I've seen
Arkshines advice and I would like to ask if my code is correct.
Arkshines post:
Quote:
Originally Posted by Arkshine
Add a random number after id.
Code:
set_task(0.1,"event1",id + 85447,"",0,"b")
In your function, remove this number to get the id :
Code:
public event1 ( TaskID )
{
new id = TaskID - 85447;
}
And to remove the task :
Code:
remove_task( id + 85447 );
|
Is this correct?
PHP Code:
public client_putinserver(id)
{
if (!task_exists(id + 1)) set_task(30.0, "PrintText", id + 1) //Checks if task already exist, if not print text set in public PrintText
if (!task_exists(id + 2)) set_task(600.0, "AuthorText", id + 2) //Checks if task already exist, if not print text set in public AuthorText
}