mirror of
https://github.com/Aaron113/urs.git
synced 2025-03-04 03:13:11 -05:00
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"
This commit is contained in:
parent
6e82699ead
commit
f1ecaf5eb0
@ -66,11 +66,11 @@ function URS.Check(ply, type, what)
|
|||||||
URS.PrintRestricted(ply, type, what)
|
URS.PrintRestricted(ply, type, what)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
end
|
||||||
elseif URS.restrictions["all"] and URS.restrictions["all"][type] and table.HasValue(URS.restrictions["all"][type], group) then
|
|
||||||
|
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")
|
ULib.tsayError(ply, "Your rank is restricted from all ".. type .."s")
|
||||||
return false
|
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
|
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 URS.limits[type][ply:SteamID()] then
|
||||||
if ply:GetCount(type.."s") >= URS.limits[type][ply:SteamID()] then
|
if ply:GetCount(type.."s") >= URS.limits[type][ply:SteamID()] then
|
||||||
|
Loading…
Reference in New Issue
Block a user