From f1ecaf5eb094c5a86a56adf372b79da21fd4b764 Mon Sep 17 00:00:00 2001 From: Aaron Date: Thu, 2 Apr 2015 16:29:14 -0500 Subject: [PATCH] Fix for "all" restrictions... * Fixed "all" restrictions not being checked if a regular restriction existed at all Example: Restricted from all sweps Admins restricted from weapon_pistol URS will see the weapon_pistol restriction and not check the "all" --- lua/ulx/modules/urs_server.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/ulx/modules/urs_server.lua b/lua/ulx/modules/urs_server.lua index b1d0307..736346a 100644 --- a/lua/ulx/modules/urs_server.lua +++ b/lua/ulx/modules/urs_server.lua @@ -66,11 +66,11 @@ function URS.Check(ply, type, what) URS.PrintRestricted(ply, type, what) return false end - - elseif URS.restrictions["all"] and URS.restrictions["all"][type] and table.HasValue(URS.restrictions["all"][type], group) then + end + + if URS.restrictions["all"] and URS.restrictions["all"][type] and table.HasValue(URS.restrictions["all"][type], group) then ULib.tsayError(ply, "Your rank is restricted from all ".. type .."s") return false - elseif table.HasValue(URS.types.limits, type) and URS.limits[type] and (URS.limits[type][ply:SteamID()] or URS.limits[type][group]) then if URS.limits[type][ply:SteamID()] then if ply:GetCount(type.."s") >= URS.limits[type][ply:SteamID()] then