Is it possible to make my own hooks?

Say I have a the function testfunc().

Is it possible to make a hook that is called every time testfunc() is run? If so, how would I do that. Thanks in advance for the replies :slight_smile:

[lua]hook.Call(“YourHookName”, GAMEMODE, args, args, args…)[/lua]

Just put that in your function and do
hook.Add(“YourHookName”, “blah”, function(arg1, arg2, arg3)
to add hooks to it.

Oh awesome, I saw but I just did quite get it. I see how to use it though, thanks.