Explain the difference
EDIT: I know how to hook all 3 events but each event is executed differently (paramaters) in many plugins but they still do the same thing. Can anybody please explain this?
PHP Code:
|
Re: Explain the difference
Events are passed with parameters. It's more efficient to specify exactly what you want and allow the engine to filter these for you, rather than hooking the event and then making those checks yourself.
From amxmodx.inc: PHP Code:
|
Re: Explain the difference
So in this:
PHP Code:
_____________________________________________ ____________________________________________ EDIT: Let me guess this now. "2!0", "4!0" in Damage Event mean that byte DamageSave byte DamageTake Should not be 0 or only get value if they are > 0. Am I right or somewhere near it? And 3=0 Defines some damage type? |
Re: Explain the difference
Quote:
|
Re: Explain the difference
devWaleed, you are talking about parameters.
2!0 means that 2nd parameter must not be equal to 2, 2&#Game_w means that 2nd parameter must contain #Game_w string 1>0 means that 1st parameter must be greater than 0. When all conditions for event are met then plugin calls specified function, for example, Event_RoundRestart. More info about parameters for each event is available here. For example, Damage event with filter "2!0", "3=0", "4!0": - damage to player must not be equal to 0 - it is DMG_GENERIC damage type (more info in hlsdk_const.inc) - origin by X coordinate of damage inflictor must not be equal to 0 |
| All times are GMT -4. The time now is 23:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.