Raised This Month: $ Target: $400
 0% 

remove_task


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 04-11-2007 , 03:07   remove_task
Reply With Quote #1

How do you know what task is being removed when calling remove_task? Where is it defined?
Styles is offline
Send a message via AIM to Styles
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-11-2007 , 03:19   Re: remove_task
Reply With Quote #2

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.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 04-11-2007 , 03:28   Re: remove_task
Reply With Quote #3

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?
Styles is offline
Send a message via AIM to Styles
pRED*
Join Date: Dec 2006
Old 04-11-2007 , 03:32   Re: remove_task
Reply With Quote #4

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
pRED* is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 04-11-2007 , 03:51   Re: remove_task
Reply With Quote #5

okay! Thanks for clearing that up for me guys.
Styles is offline
Send a message via AIM to Styles
Silencer123
Veteran Member
Join Date: Jul 2006
Old 04-11-2007 , 08:38   Re: remove_task
Reply With Quote #6

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?
__________________
EAT YOUR VEGGIES
Silencer123 is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 04-11-2007 , 09:34   Re: remove_task
Reply With Quote #7

One remove task will remove every task with the same id.
__________________
Brad is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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