Are there any negative side effects to setting hooks this way?
#10
That's a neat way of storing the hooks, but I'd probably use something like this instead:
Code:
local hooks = { [cPluginManager.HOOK_TICK] = function(TimeDelta) end } function Initialize(Plugin) Plugin:SetName("SomeCoolPlugin") Plugin:SetVersion(1) if hooks then for hook, callback in pairs(hooks) do cPluginManager:AddHook(hook, callback) end end return true; end
Reply
Thanks given by:


Messages In This Thread
RE: Are there any negative side effects to setting hooks this way? - by NiLSPACE - 01-09-2018, 03:56 AM



Users browsing this thread: 1 Guest(s)