NCrawler Posted January 9, 2014 Share Posted January 9, 2014 If you ever have the need to remove one of the default items from the spawn list, then this code should help you out.require 'Items/SuburbsDistributions'for i,v in pairs(SuburbsDistributions) do if v.items ~= nil then local k=1 while k <= #v.items do if v.items[k] == "Base.Pen" then table.remove(v.items, k) table.remove(v.items, k) elseif v.items[k] == "Base.Pencil" then table.remove(v.items, k) table.remove(v.items, k) else k = k + 1 end end else for i2, v2 in pairs(v) do if v2.items ~= nil then local k=1 while k <= #v2.items do if v2.items[k] == "Base.Pen" then table.remove(v2.items, k) table.remove(v2.items, k) elseif v2.items[k] == "Base.Pencil" then table.remove(v2.items, k) table.remove(v2.items, k) else k = k + 1 end end end end endendYou can add more elseif lines to add more items or delete them if fewer are required. Hope this will help someone. There are too few code examples here in the tutorial section... Wombatlord 1 Link to comment Share on other sites More sharing options...
Cursed Phoenix Posted November 15, 2019 Share Posted November 15, 2019 how would i use this to remove junk item's form zombie drops.. new to modding so just learning Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now