Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ZarpUlxHooks.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
- hook.Add("ulxadduserid", "timekeepulxadduserid", function(calling_ply,id,group)
- if not checkForValidId( calling_ply, id ) then return false end
- zarpTime.setPlayerTimeRank(id,group)
- end)
- hook.Add("ulxremoveuserid", "timekeepulxremoveuserid", function(calling_ply,id)
- if not checkForValidId( calling_ply, id ) then return false end
- zarpTime.setPlayerTimeRank(id,"user")
- end)
- hook.Add("ulxadduser", "timekeepulxadduser", function(calling_ply,target_ply,group_name)
- zarpTime.setPlayerTimeRank(target_ply:SteamID(),group_name)
- end)
- hook.Add("ulxremoveuser", "timekeepulxremoveuser", function(calling_ply,target_ply)
- zarpTime.setPlayerTimeRank(target_ply:SteamID(),"user")
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement