Ham return types question.
Do I only need to use the "Ham" return constants in functions that are handling the RegisterHam forward?
Does this answer change if "post" is specified in RegisterHam since you wouldn't be able to stop the forwarded function by then anyway? (i.e. If I use "post" in RegisterHam can I use PLUGIN_HANDLED and PLUGIN_CONTINUE for the the function handling the forward instead?) Thanks. |
Re: Ham return types question.
Use the return values given with each include.
If you use a forward from HamSandwich, use HAM_* returns. If you use a forward from Fakemeta, use FMRES_* returns. Otherwise, use PLUGIN_* returns. |
Re: Ham return types question.
Another question:
I switched from register_event("DeathMsg", "player_death", "a") to RegisterHam(Ham_Killed, "player", "ham_player_death", 1). In player_death() I used PLUGIN_CONTINUE for all my return values. From what I read in the constant include files I should convert all PLUGIN_CONTINUEs to HAM_HANDLED? I was told that PLUGIN_HANDLED in the register_event case would cause the death to be unhookable by other plugins. |
Re: Ham return types question.
Quote:
In your case, a direct comparison would be: PLUGIN_CONTINUE = HAM_IGNORED PLUGIN_HANDLED = HAM_SUPERCEDE |
Re: Ham return types question.
In Ham case you must return anything nomather what (or else there is a possibility that function wont work - try takedamage for example).
|
Re: Ham return types question.
Quote:
|
Re: Ham return types question.
I once tested Ham_TakeDamage. When I didn't return anything - damage wasn't given. I'm telling you.
|
Re: Ham return types question.
Quote:
PHP Code:
|
Re: Ham return types question.
Quote:
|
| All times are GMT -4. The time now is 09:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.