[Answered]Would this make everyone's weapon quality Valve?
PHP Code:
|
Re: Would this make everyone's weapon quality Valve?
You're forgetting a few flags to TF2Items_CreateItem... did you mean OVERRIDE_ALL instead of OVERRIDE_ATTRIBUTES? Also, you'll still need PRESERVE_ATTRIBUTES too.
|
Re: Would this make everyone's weapon quality Valve?
Quote:
Also note: This will eventually be a private plugin for me for admin weapons(where strange shotty would work with, with configs it won't work right(in terms of maxprimary/2nd ammo when otherweapons also handle that) |
Re: Would this make everyone's weapon quality Valve?
One other thing: You close hItem before the callback returns, so it's not going to work anyway... but to avoid leaking handles, you need to close said handle...
The best workaround for this issue is either a global or static variable. I personally prefer static. So, something like... PHP Code:
|
Re: Would this make everyone's weapon quality Valve?
Quote:
PHP Code:
|
Re: Would this make everyone's weapon quality Valve?
Quote:
|
Re: Would this make everyone's weapon quality Valve?
Did that, still crashes.
|
Re: Would this make everyone's weapon quality Valve?
You could just change the value of m_iEntityQuality and m_iEntityLevel and not have to deal with TF2Items.
|
Re: Would this make everyone's weapon quality Valve?
PHP Code:
|
Re: Would this make everyone's weapon quality Valve?
Quote:
|
Re: [Answered]Would this make everyone's weapon quality Valve?
Because leaking thousands of handles until said plugin unloads itself is good?
|
Re: [Answered]Would this make everyone's weapon quality Valve?
Quote:
|
[Answered]Would this make everyone's weapon quality Valve?
Sorry, yeah, you need to set previousItem to INVALID_HANDLE after the call to CloseHandle - I moved some logic around and forgot to change that.
|
Re: [Answered]Would this make everyone's weapon quality Valve?
Quote:
|
Re: [Answered]Would this make everyone's weapon quality Valve?
Reloading a plugin to free handles is not a good solution
|
Re: [Answered]Would this make everyone's weapon quality Valve?
Kind of figured it out but asherkin was helpful in telling me why using closehandles sometimes caused errors with the plugin and how to fix.
|
| All times are GMT -4. The time now is 21:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.