mirror of
https://github.com/StyledStrike/gmod-custom-loadout.git
synced 2025-03-04 03:03:09 -05:00
Search weapons by class
This commit is contained in:
parent
a13b3d368b
commit
081879e300
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user