Hi, I'm using this script:
if SERVER then
AddCSLuaFile();
else
local oWeaponsGetList = weapons.GetList;
function weapons.GetList()
local tbl = oWeaponsGetList();
if( !IsValid( LocalPlayer() ) ) then
return tbl;
end
local grp = LocalPlayer():GetUserGroup();
local tbl2 = table.Copy(EquipmentItems)
if( string.find( tostring( debug.traceback() ), "GetEquipmentForRole" ) != nil ) then
for k,v in pairs( tbl ) do
if( v and v.CanBuy ) then
if( v.GroupOnly and v.Groups ) then
if( !table.HasValue( v.Groups, grp ) ) then
table.remove( tbl, k );
end
end
end
end
return tbl;
end
end
end
And I was wondering if I can distinguish the weapons that are assigned to usergroups to look like this:
https://files.facepunch.com/forum/upload/110605/dfae589e-b8fe-41ee-a9f9-7c05dab9f9bb/unknown.png
My point is that this yellow badge should only have weapons for usergroups, any ideas?
garrysmod/cl_equip.lua at master · Facepunch/garrysmod · GitHub
I was trying to edit this for 2-3 hours but I have not idea how to do it correctly, I don't know what I have to do there.
Sorry, you need to Log In to post a reply to this thread.