tfcx bug
Could someone please fix the tfc_setweaponammo() function in the tfcx module? It doesn't work.
Moreover, when this function gets called, some core amxx functions start glitching as well as functions from other modules. No amxx errors where showing up which either. Once tfc_setweaponammo() is removed from plugin amxx and its modules starts behaving as normal. |
Re: tfcx bug
More infos would be welcomed + test plugin.
|
Re: tfcx bug
Specify what info you need so I know what to tell you.
|
Re: tfcx bug
Actually, just a simple test plugin which shows the issue should be enough to explain.
|
Re: tfcx bug
PHP Code:
|
Re: tfcx bug
This native expects a weapon entity. Are you sure the inflictor "wpn" is the weapon index here?
Anyway this natives just set an offset on a weapon. You most likely don't use it properly. |
Re: tfcx bug
It has with some weapons in the past. You asked for a test plugin so I tossed one together. I've tried get_user_weapon() to get the weapon entity but tfcx still rejects it. If none of the means to get the weapon entity return values acceptable to tfcx, then how the heck is tfc_setweaponammo() even workable? It doesn't seem anything is compatible with tfc_setweaponammo(). This function is too temperamental to work with and pretty much useless when nothing returns weapon ent values it can accept.
|
Re: tfcx bug
Tested tfc_getweaponammo and it works fine, but it's expected, it just sets some offset. All you need to provide is a weapon index. That's not something you will get from inflictor in TakeDamage, generally such index is the weapon projectile.
Also, get_user_weapon doesn't return the weapon index, but the identifier TFC_WPN_* . |
Re: tfcx bug
Something you can do:
PHP Code:
|
Re: tfcx bug
So theres no singular function for getting weapon entity? If I remember correctly, find entity by class only returns the 1st match it finds and then stops there.
Sorry for reporting this one as a bug. Looked like a bug when HLDS wasn't displaying errors making it hard to find out what was going on until I restarted it. When you say offset you mean the private data offset right? Would set_pdata_* be an alternative? What kind of private data is it and what is its offset? |
All times are GMT -4. The time now is 20:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.