Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook = {
- functions={},
- Add = function(hookTo, hookName, func)
- table.insert(functions,{
- name = hookName,
- func = func,
- })
- end,
- Call = function(hookName, ...)
- for k,v in pairs(functions) do
- if v.name == hookName then
- v.func(...)
- end
- end
- end,
- }
- hook.Add("This is a joke!", "Joke 1",
- function(cookies, morecookies)
- print(cookies + morecookies)
- end
- )
- hook.Call("This is a joke!", 2, 52)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement