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?
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?
If the hook has an equivalent gamemode function (function GM:HookName()) then use this:
otherwise, use this:hook.Call("HookName", GAMEMODE)
hook.Call("HookName")
Thanks, doesn't seem so complicated after all.
GM:PlayerDeath( Victim, Inflictor, Killer ) hook.Call( "PlayerCanDie", self ); end
Like that, hook it like normally.
EDIT: Ninja'd.. You beat me to it.