AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   HamSandwich Disable/Enable Hook (https://forums.alliedmods.net/showthread.php?t=228552)

Phant 10-22-2013 10:48

HamSandwich Disable/Enable Hook
 
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?

pokemonmaster 10-22-2013 12:30

Re: HamSandwich Disable/Enable Hook
 
They are
DisableHamForward
and
EnableHamForward

NOT Hook

Phant 10-22-2013 13:10

Re: HamSandwich Disable/Enable Hook
 
Quote:

Originally Posted by pokemonmaster (Post 2051819)
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.

ConnorMcLeod 10-22-2013 13:56

Re: HamSandwich Disable/Enable Hook
 
Quote:

Originally Posted by Phant (Post 2051830)
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

Phant 10-22-2013 14:04

Re: HamSandwich Disable/Enable Hook
 
Quote:

Originally Posted by ConnorMcLeod (Post 2051842)
Don't know what you are talking about :p

Ha-ha, that is Wiki advantage! Thanks for editing.


All times are GMT -4. The time now is 23:16.

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