Multi-Plugin Support
I talked to Voided about using the OnGiveNamedItem to edit a weapon's attributes through multiple plugins. I got it to work, then I ran into some complications. Sadly, since I have to take into consideration that handles don't close themselves, the code has to be adjusted properly to get it to work.
At the moment I have this: PHP Code:
|
Re: Multi-Plugin Support
use your own forward
|
Re: Multi-Plugin Support
Quote:
|
Re: Multi-Plugin Support
What's the problem?
Static the handle to invalid in ogni as you are, the close if if it's not. Then it's invalid, set it so (no need to check again...) And do your stuff. You only use one forward. Ogni gets called each time a player gets an item, that's the point of a global forward. https://wiki.alliedmods.net/Function...lobal_Forwards |
Re: Multi-Plugin Support
-snip-
-snip snip- I don't think friar's post helps either. Right now if two plugins use OnGiveNamedItem whichever one is called last is the one that works. Is there a way to use this particular function in multiple plugins without having them lapse each other or have this phenomena occur? |
Re: Multi-Plugin Support
use a single plugin that uses tf2items, have that plugin send out a new forward to every single plugin that registered to use it and merge their returns
|
Re: Multi-Plugin Support
if (hItem != INVALID_HANDLE), create a new item and merge the existing flags/attributes (get attribute count, loop through them, add the new, modify the dupes)
|
| All times are GMT -4. The time now is 21:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.