Raised This Month: $ Target: $400
 0% 

HamSandwich Disable/Enable Hook


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 10-22-2013 , 10:48   HamSandwich Disable/Enable Hook
Reply With Quote #1

Hello. I try:
Code:
public plugin_init() {
    new HamHook:ham_handle_worldspawn = RegisterHam(Ham_TraceAttack, "worldspawn", "fw_TraceAttack")
}
And disable/enable it:
Code:
public cc_toggle(id)
{
    if(wbh_toggle == 0)
    {
        EnableHamHook(ham_handle_worldspawn)
    } else {
        DisableHamHook(ham_handle_worldspawn)
    }
}
Compile error:
Code:
warning 204: symbol is assigned a value that is never used: "ham_handle_worldspawn"
error 017: undefined symbol "EnableHamHook"
error 017: undefined symbol "DisableHamHook"
Seems like there are no EnableHamHook/EnableHamHook functions.
How I can disable/enable HamSandwith hooks?
Phant is offline
Send a message via ICQ to Phant
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 10-22-2013 , 12:30   Re: HamSandwich Disable/Enable Hook
Reply With Quote #2

They are
DisableHamForward
and
EnableHamForward

NOT Hook
__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.
pokemonmaster is offline
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 10-22-2013 , 13:10   Re: HamSandwich Disable/Enable Hook
Reply With Quote #3

Quote:
Originally Posted by pokemonmaster View Post
They are
DisableHamForward
and
EnableHamForward

NOT Hook
Thanks you!
I just found DisableHamHook() and EnableHamHook() here:
http://wiki.amxmodx.org/HamSandwich_...28AMX_Mod_X%29
Maybe this outdate tutorial or something.
Phant is offline
Send a message via ICQ to Phant
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-22-2013 , 13:56   Re: HamSandwich Disable/Enable Hook
Reply With Quote #4

Quote:
Originally Posted by Phant View Post
Thanks you!
I just found DisableHamHook() and EnableHamHook() here:
http://wiki.amxmodx.org/HamSandwich_...28AMX_Mod_X%29
Maybe this outdate tutorial or something.
Don't know what you are talking about :p
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 10-22-2013 , 14:04   Re: HamSandwich Disable/Enable Hook
Reply With Quote #5

Quote:
Originally Posted by ConnorMcLeod View Post
Don't know what you are talking about :p
Ha-ha, that is Wiki advantage! Thanks for editing.
Phant is offline
Send a message via ICQ to Phant
Reply


Thread Tools
Display Modes

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 23:16.


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