Ham Damage (Knife)
Greetings.
I have a level system which gives xp to "killer" for every kill... Example if Knife Kill = +5xp if HS knife kill = +7xp. But I need a plugin that will multiply the knife damage and not affect the Level system, because some plugins I tried... won't give xp after knife kill. I think RegisterHam(Ham_TakeDamage, ....) should be the solution, but I do not know how to create such thing by myself. register_event works but, doesnt give XP after knife kill. Anyone who can help? Thank you. |
Re: Ham Damage (Knife)
Code:
|
Re: Ham Damage (Knife)
There's no reason for the other plugin not to work unless you're stopping the event in your plugin.
Both "register_event" and "RegisterHam" should work if you do it properly. I suggest the latter. |
Re: Ham Damage (Knife)
Okay, but what should I correct here then so it should work?
Or how should I convert this to RegisterHam? Here's the source of knife damage. PHP Code:
|
Re: Ham Damage (Knife)
PHP Code:
Your code is unnecessarily complicated. With "Ham_TakeDamage" you can do the same thing with 20x times less code. |
Re: Ham Damage (Knife)
Well it doesn't even work now, does anyone have any idea of another knife damage multiplier which fills my criteria too?
|
Re: Ham Damage (Knife)
Please consider reading what I said above and tell us what you've tried so far...
|
Re: Ham Damage (Knife)
Well as much as I could possibly understand, I somehow managed to reach this point.
But not sure if this is fully correct. And I would also like to make this work only for RIGHT CLICK Stab. PHP Code:
|
Re: Ham Damage (Knife)
You're registering the event as POST. This means the event has already passed so you can't possibly modify anything. The last argument in "RegisterHam" needs to be 0 if you want to change things (PRE).
Also, in ham you use HAM_IGNORED, HAM_HANDLED, HAM_SUPERCEDE, not PLUGIN_*. |
Re: Ham Damage (Knife)
Ok thank you.
I'm not sure which one is correct IGNORED or SUPERCEDE but I put supercede. Is this okay now? PHP Code:
|
All times are GMT -4. The time now is 11:43. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.