Question about task id's with set_task
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? |
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. |
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! |
| All times are GMT -4. The time now is 17:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.