Register/Unregister HAM
On one of my servers, I run a big plugin that hooks reload, primary attack, primary attack post, and take damage. I was wondering if it's possible to not even look at those if they don't have certain skills (unregister the HAM hook if they do not have a certain skill, per player basis).
It seems that a lot of data is being sent to them even if they are lower level or level 0, since it's hooking their attacks for everything. I do check for their levels right at the beginning, but I'd prefer it to not even have to check (or only check once) if it could be done. |
Re: Register/Unregister HAM
DisableHamForward()
|
Re: Register/Unregister HAM
Right I know that, but will it not disable the forward alltogether? I still want people with the skills to be hooked, but if they don't have the skills to not bother with the forwards.
|
Re: Register/Unregister HAM
You hook an entire entity class (not a single player) when you register a ham forward, so the answer is no. Maybe use a bit-field to store which players have what and check that first in the forward.
|
Re: Register/Unregister HAM
EDIT: Ah, yes... it is hooked for all entities of the provided class... won't wok... |
| All times are GMT -4. The time now is 06:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.