Raised This Month: $ Target: $400
 0% 

Question about task id's with set_task


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Trp. Jed
Member
Join Date: Aug 2004
Old 10-09-2004 , 14:47   Question about task id's with set_task
Reply With Quote #1

I've just about finished plugin but i'm having some issues with set_task and task id's.

As any player can trigger the same function via a task, I was passing their player id as the task id, however I've noticed in other peoples plugins that they are either hard coding a task id modifying it with n+id.

Do task id's get shared across running plugins or are they exclusive to each one? i.e if I start tast with id 1 in my plugin with it conflict with another task id'd as 1 in another plugin if the two are running at the same time?

I tried using 239+id in my set_task call but the task never gets called so I'm guessing thats a no-no.

So could someone clarify the relationship between task id's and other plugins or am I ok to just use the players id as a unique task identifier?
Trp. Jed is offline
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 10-09-2004 , 16:55  
Reply With Quote #2

If you only have 1 task pr player. Then using their id is both logical and recommend. A set_task id is not "global" , its only for that plugin.

The reason why some plugins use id+32 is if the plugin can have more then 1 task pr player.
EKS is offline
Trp. Jed
Member
Join Date: Aug 2004
Old 10-09-2004 , 17:28  
Reply With Quote #3

ah ok, i understand, i want quite sure.

See when the task im running is, err, running the user is blocked from triggering it again until its ended so I guess its safe to use just the id.

Thanks for the help!
Trp. Jed 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 17:16.


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