Why return PLUGIN_HANDLED doesnt work :angry: ?
Hello, I noticed return PLUGIN_HANDLED doent work properly.
Part of my mod, sets custom damage for "almost invincible" property, but I am still getting same damage than always :angry: :angry: :angry: :angry: :angry: :angry: :angry: :angry: :angry: Check this source out: PHP Code:
I even tested this, to nobody gets hurt, but it doesnt work either :megaangry: PHP Code:
Thanks in advance |
Re: Why return PLUGIN_HANDLED doesnt work :angry: ?
Use hamsandwich's Ham_TakeDamage
|
Re: Why return PLUGIN_HANDLED doesnt work :angry: ?
Quote:
|
Re: Why return PLUGIN_HANDLED doesnt work :angry: ?
Spoiler
Just use ham_takedamage forward |
Re: Why return PLUGIN_HANDLED doesnt work :angry: ?
When you register an "event", the event has already happened so you can't change it, you can only react to it. You have to hook Ham_TakeDamage as a prehook so that you can catch the event before the event even happens. Only then can you actually do anything to change the circumstances of the event itself.
|
Re: Why return PLUGIN_HANDLED doesnt work :angry: ?
Thanks everyone. I could finish my plugin. I will post it soon
|
| All times are GMT -4. The time now is 09:18. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.