Ham_TakeDamage Pre issues
I got a lil problem with this when i try to ignore the damage dealt to the victim, using SetHamParamFloat(4, 0.0) doesnt work, all normal damage is still being performed so then i tried to change the attackerid to the victimid so that zombie plague could not process this whole event as a possible infection. but this doesnt work neither.
Is it possible to change the damagebits to DMG_FALL and change the attackerid to the victimid? unless some1 can see why the damage would still be the normal damage, i dont see any other options. Also the hamhook is not being executed on bots PHP Code:
|
Re: Ham_TakeDamage Pre issues
for bots you have to use RegisterHamFromEntity
|
Re: Ham_TakeDamage Pre issues
If you want that another plugin than the one you are showing can detect that your plugin has blocked the function, then you have to declare your plugin before the second one in plugins.ini
And in the other plugin (main ZP plugin from what i understand), you have to check the return status when the forward is called if( GetHamReturnStatus() == HAM_SUPERCEDE ) return; Something like that. Also, in your code, 1st return should be HAM_IGNORED (you don't do anything), seconde return is correct (you want to block damage), and last return should be HAM_HANDLED (you have changed something but you don't want to block). |
Re: Ham_TakeDamage Pre issues
Quote:
Quote:
Quote:
In Ham_TakeDamage pre hook from zombieplague? will the main zp be able to pick up on the returned value from my zombieclass because my class loaded first, then zp? Quote:
Thanks for the help so far guys |
Re: Ham_TakeDamage Pre issues
I did what you said connor and everything works now, also thanks to your ham_register_czbots plugin you gave me a while ago the ham is also being activated for bots, everything finnally works as it should.
thanks for the help ! |
| All times are GMT -4. The time now is 10:10. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.