Raised This Month: $ Target: $400
 0% 

set_task - global


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
waza123a
Member
Join Date: Mar 2010
Old 08-27-2013 , 17:27   set_task - global
Reply With Quote #1

Why many users are setting unique task id ?

#defname unique_task_id = 12345

Code:
set_task(5.0, "f", id+unique_tas_id)
all tasks are global in all plugins ? i can access task from other plugin or what ?
waza123a is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 08-27-2013 , 17:47   Re: set_task - global
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=125638
dark_style is offline
waza123a
Member
Join Date: Mar 2010
Old 08-27-2013 , 18:12   Re: set_task - global
Reply With Quote #3

So from that topic I understand that set_task() are local. Correct ?
waza123a is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 08-28-2013 , 02:44   Re: set_task - global
Reply With Quote #4

If you want to access task used by another plugin, read Exolent's post again.

Last edited by dark_style; 08-28-2013 at 04:22.
dark_style is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-28-2013 , 13:32   Re: set_task - global
Reply With Quote #5

set_task() is "local" but can be stopped globally by remove_task().
You don't even need an unique id locally.
__________________

Last edited by Black Rose; 08-28-2013 at 13:32.
Black Rose is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-28-2013 , 15:34   Re: set_task - global
Reply With Quote #6

Unique IDs are only needed if you are using remove_task in the plugin or you have multiple tasks going to the same handler
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
waza123a
Member
Join Date: Mar 2010
Old 08-28-2013 , 17:10   Re: set_task - global
Reply With Quote #7

thanks, question solved.
waza123a 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 19:10.


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