Commit e512cb54 authored by Jonah's avatar Jonah

added prop ban checking

parent c4de133e
......@@ -115,3 +115,19 @@ local function propban_check()
end
hook.Add("TTTBeginRound","propban checking", propban_check())
function ulx.checkPropban(calling_ply, target_ply)
local currentRounds = target_ply:GetPData("propban_rounds") or 0
local reason = target_ply:GetPData("propban_reason") or ""
if currentRounds == nil then
calling_ply:ChatPrint("Target is not prop banned")
elseif currentRounds == 0 then
calling_ply:ChatPrint("Target has 0 prop banned rounds")
else
calling_ply:ChatPrint("Target has "..currentRounds.." banned rounds remaining".." and the reason is: "..reason)
end
end
local checkPropban = ulx.command( CATEGORY_NAME, "ulx checkpropban", ulx.checkmute, "!checkpropban")
checkmute:addParam{type=ULib.cmds.PlayerArg}
checkmute:defaultAccess(ULib.ACCESS_ADMIN)
checkmute:help("Checks how many rounds a player cannot interact with props for")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment