Remove tasks
Can you do like this to remove tasks (if the player has like 3 tasks)?
Code:
|
Re: Remove tasks
That's why you have to ad a constant number to a task :
set_task(1.0,"task1",1578+id) set_task(1.0,"task2",2790+id) Then you can check if each task exists. |
Re: Remove tasks
If you want all tasks associated with a player to end, you don't have to do as connorr said. You can just use their id in all of them. Then, when you remove_task, it will remove all tasks in that plugin for that id.
However, if you want finer control over each, do as connorr said. |
Re: Remove tasks
So, 2 tasks can have the same id at the same moment without any trouble ?
|
Re: Remove tasks
they can but when u remove it you will remove both at once. I just learned this.
|
Re: Remove tasks
So my script does work?
|
Re: Remove tasks
If you don't need to remove those tasks separatly, yes.
|
Re: Remove tasks
Quote:
Anyway, how would you remove only one of those tasks? And how will you get the id without the constant number? |
Re: Remove tasks
Quote:
Quote:
Quote:
|
Re: Remove tasks
Quote:
I must remove the task before creating a new one, in order to avoid multiple tasks with the same command. |
| All times are GMT -4. The time now is 06:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.