AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   remove_task (https://forums.alliedmods.net/showthread.php?t=53793)

Styles 04-11-2007 03:07

remove_task
 
How do you know what task is being removed when calling remove_task? Where is it defined?

teame06 04-11-2007 03:19

Re: remove_task
 
You have to know the taskid for the first parameter of the remove_task native. If you want to remove the taskid for another plugin you need to set the parameter of the remove_task otherwise you only remove task that are made in that plugin.

You need to know the taskid or you can't remove the task.


For example
Code:
set_task(1.0, "function", 94859, ...)

94859 is the 3rd parameter of set_task and is also the taskid.

Styles 04-11-2007 03:28

Re: remove_task
 
well for like set_task(1.0, "setHunger",0,"",0,"b"); what is the id of it 0?
is the 0 supposed to be unique?

pRED* 04-11-2007 03:32

Re: remove_task
 
Yeah change the 0 to some unique number and then use that same number in remove_task

something like

Code:
#define TASK_NAME 43324

could be usefull to make things easier to read

Styles 04-11-2007 03:51

Re: remove_task
 
okay! Thanks for clearing that up for me guys.

Silencer123 04-11-2007 08:38

Re: remove_task
 
Ah, now I know what that is, too. ^^
One question from my side:
There can be multiple tasks with the same id - Will one
single remove_task function remove all tasks with that
id then or only one specific or random one?

Brad 04-11-2007 09:34

Re: remove_task
 
One remove task will remove every task with the same id.


All times are GMT -4. The time now is 06:42.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.