Commit b36f372d authored by Jonah's avatar Jonah

bug fixes

made a few changes, admins would not have been able to remove rounds
parent 573f5500
......@@ -15,7 +15,7 @@ function ulx.propban( calling_ply, target_ply, num_rounds, reason)
if not GetConVarString("gamemode") == "terrortown" then ULib.tsayError( calling_ply, "Current gamemode is not TTT", true ) else
local rounds_left = tonumber(target_ply:GetPData("propban_rounds")) or 0
local current_rounds
local new_rounds
local new_rounds = num_rounds
if ulx.getExclusive( target_ply, calling_ply ) then
ULib.tsayError( calling_ply, ulx.getExclusive( target_ply, calling_ply ), true )
......@@ -23,7 +23,7 @@ function ulx.propban( calling_ply, target_ply, num_rounds, reason)
ULib.tsayError( calling_ply, "Invalid integer:\"" .. num_rounds .. "\" specified.", true )
else
current_rounds = tonumber(target_ply:GetPData("propban_rounds")) or 0
if new_rounds > 0 then
if new_rounds ~= 0 then
target_ply:SetPData("propban_rounds", new_rounds)
target_ply:SetPData("propban_reason", reason)
else
......
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