Raised This Month: $ Target: $400
 0% 

Index out of bounds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-14-2014 , 12:04   Re: Index out of bounds
Reply With Quote #10

In every Ham hook you can specify if it's a pre or post hook (the last argument in RegisterHam).

If it's a pre hook, it happens before the action happens so you can use the return values to block the action, you also have an arsenal of natives to use such as SetHamParamInt/Float/...

However in post hook the action has already happened and there's nothing you can do about it. It's good to hook post if you for example want to check the DEFINITE damage in TakeDamage. If you hooked it as a pre, there's a chance another plugin might still change the value.
Backstabnoob is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode