Set_Task Question
+All right, I see many of plugin for now and I don't know why people set tasks with:
1.
2.
3.
4.
|
Re: Set_Task Question
2- Because if you want to make a task just for one player (or players that are assigned in the variable "id"), you have to make that way
3- I've never seen something like that, so I don't know 4- I always do that but I can't explain why too |
Re: Set_Task Question
1 - used for simple functions and tasks.
2 - used if you want to use the task on a certain player (id). 3 - a more reliable way of using it on a certain player (id). This way it won't get mixed up with other tasks. Let's say for example you have multiple set_task functions and all of them use "id". If you use remove_task(id), it will remove all of them, but instead you want to remove only one, so that's way you mix the id with a random number and you set different numbers on different tasks, and then you substracts that number from the id, so it will remove that task only. 4 - what kind of a loop are you talking about? If the task is set on 5 seconds for example and you use remove_task within those seconds, it will remove the task? |
Re: Set_Task Question
1. if have (id) after the function, you need id+TaskRandom
in the function you need to add: PHP Code:
PHP Code:
Will be PHP Code:
set_task(time,function,id) is a bad way because will cause conflits. Have this format for set_task: PHP Code:
Correct me if i'm not right. |
Re: Set_Task Question
Please ignore the post above if you don't want to get totally confused. The examples shown in it are totally incorrect.
|
Re: Set_Task Question
Quote:
|
Re: Set_Task Question
Read and understand this:
Code:
native set_task(Float:time, const function[], id = 0, const any:parameter[] = "", len = 0, const flags[] = "", repeat = 0);
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Re: Set_Task Question
Quote:
|
Re: Set_Task Question
Quote:
|
Re: Set_Task Question
Exactly. Learn how to help him.
|
| All times are GMT -4. The time now is 18:39. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.