Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UlxHooks = UlxHooks or {}
- function UlxHooks.setupHooks()
- local ulxCommands = ulx.cmdsByCategory
- for k,cat in pairs(ulxCommands) do
- for k,cmd in pairs(cat) do
- local oldFm = cmd.fn
- local cmdNam = string.Replace(cmd.cmd, " ","")
- cmd.fn = function(...)
- hook.Call(cmdNam,nil,...)
- return oldFm(...)
- end
- end
- end
- ulx.cmdsByCategory = ulxCommands
- end
- --Usage
- hook.Add("ulxadduserid", "timekeepulxadduserid", function(calling_ply,id,group)
- print("ulx user add by id")
- end)
- hook.Add("ulxremoveuserid", "timekeepulxremoveuserid", function(calling_ply,id)
- print("Ulx Remove user by id")
- end)
- hook.Add("ulxadduser", "timekeepulxadduser", function(calling_ply,target_ply,group_name)
- print("Ulx Add User")
- end)
- hook.Add("ulxremoveuser", "timekeepulxremoveuser", function(calling_ply,target_ply)
- print("Ulx Remove User")
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement