1. Post #1
    I'm a tool
    KillerLUA's Avatar
    June 2009
    881 Posts
    I know how to add a hook to a function, but how would I get a working custom hook?

    There is no example on how to use hook.Call on the wiki, anybody know?

  2. Post #2
    Taught by John Lua
    MakeR's Avatar
    May 2007
    2,841 Posts
    If the hook has an equivalent gamemode function (function GM:HookName()) then use this:
    hook.Call("HookName", GAMEMODE)
    otherwise, use this:
    hook.Call("HookName")

  3. Post #3
    I'm a tool
    KillerLUA's Avatar
    June 2009
    881 Posts
    Thanks, doesn't seem so complicated after all.

  4. Post #4
    Gold Member
    thejjokerr's Avatar
    December 2007
    1,584 Posts
    GM:PlayerDeath( Victim, Inflictor, Killer )
       hook.Call( "PlayerCanDie", self );
    end

    Like that, hook it like normally.

    EDIT: Ninja'd.. You beat me to it.