Ham Sandwich > EnableHamFoward etc
Hey,
I'm new to AMX MOD X scripting so this is one of my first scripts so bare with me. I am using Ham Sandwich to hook player spawn. This works fine. What I can't do is disable the hook when I don't require it. I understand that I need to use EnableHamForward() and DisableHamForward() but I don't understand how to use them. Could someone provide me with some sample code using the functions EnableHamForward() and DisableHamForward()? Or atleast tell me what goes in the brackets :p Thanks, Marky_UK |
Re: Ham Sandwich > EnableHamFoward etc
Well, all I did was hit the magic button, type in "EnableHamForward" and it told me what I needed to know.
|
Re: Ham Sandwich > EnableHamFoward etc
Save the handle from RegisterHam() and use DisableHamForward()/EnableHamForward() with this handle.
|
Re: Ham Sandwich > EnableHamFoward etc
You can look at plugins wich does that but with fakemeta. The same thing is with Ham (like arkshine said)
|
Re: Ham Sandwich > EnableHamFoward etc
enum HamHook {
BAD_HOOK_VALUE = 0 } And then: new HamHook:hamFwd = RegisterHam(Ham_xxx, "xxx", "xxx") if(hamFwd == BAD_HOOK_VALUE) { /* Handle HAM error here. */ } Yeah, I had been looking at the answer for ages but I didnt understand this code at the time (2am :p) Thank you very much for your help. |
| All times are GMT -4. The time now is 08:53. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.