Calling a function from or passing its value to other plugins
Say that I have a plugin with a function that counts i every x seconds. Now, if I want to adjust cvars in other plugins based on the i++ value, what is the best method to call that count function or pass its value to those other plugins? I read the wiki section on forwards and it seems that method could be used here, though I've not used one before and am not sure how to set it up.
OTOH, would it be equally effective to simply include the count function and its timer in the other plugins and create the timers from the same event hook? Would the timers stay synchronized and does it matter? :? Thank you, PG |
Re: Calling a function from or passing its value to other plugins
I would personally use the forwards method. It is much more streamlined than recreating the whole function. With that being said it also depends on the function. Would you be using this function in multiple plugins or just one?
|
Re: Calling a function from or passing its value to other plugins
Quote:
PG |
Re: Calling a function from or passing its value to other plugins
Forward is definitely the way to go then!
|
All times are GMT -4. The time now is 07:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.