Search weapons by class

This commit is contained in:
StyledStrike 2023-02-19 11:42:21 -03:00
parent a13b3d368b
commit 081879e300

View File

@ -142,8 +142,9 @@ function CLoadout:UpdateAvailableList()
-- dont list weapons that dont match the search filter
if self.filter ~= "" then
local found = string.find( string.lower( v.name ), self.filter, 1, true )
if not found then continue end
local foundClass = string.find( class, self.filter, 1, true )
local foundName = string.find( string.lower( v.name ), self.filter, 1, true )
if not foundClass and not foundName then continue end
end
v.blacklisted = self:IsBlacklisted( localPly, class )