same problem, used
Code:
-- weapon mods
for mod_id,_ in pairs(tweak_data.blackmarket.weapon_mods) do
tweak_data.blackmarket.weapon_mods[ mod_id ].unlocked = true
managers.blackmarket:add_to_inventory("normal", "weapon_mods", mod_id, false)
end
instead of
Code:
-------------------------------------------------------------------------
-- GiVE iTEMS ("masks", "materials", "textures", "colors", "weapon_mods")
-- example: giveitems( 50, "masks")
-------------------------------------------------------------------------
function giveitems( times, type )
for i=1, times do
for mat_id,_ in pairs(tweak_data.blackmarket[type]) do
if _.infamous then
managers.blackmarket:add_to_inventory("infamous", type, mat_id, false)
else
managers.blackmarket:add_to_inventory("normal", type, mat_id, false)
end
end
managers.blackmarket:remove_item("normal", "materials", "plastic", false)
managers.blackmarket:remove_item("normal", "colors", "nothing", false)
end
end
giveitems( 2, "weapon_mods" )
giveitems( 5, "masks" )
giveitems( 5, "materials" )
giveitems( 5, "textures" )
giveitems( 5, "colors" )
had to use this to remove unusable dlc items (also removed the part of code that gave the unusable dlc items from above)
Code:
if managers.hud then
managers.hud:show_hint( { text = "Executed script.lua" } )
for i=1, 5 do
for mat_id,_ in pairs(tweak_data.blackmarket.masks) do
managers.blackmarket:remove_item("preorder", "masks", mat_id, false)
end
for mat_id,_ in pairs(tweak_data.blackmarket.materials) do
managers.blackmarket:remove_item("preorder", "materials", mat_id, false)
end
for mat_id,_ in pairs(tweak_data.blackmarket.textures) do
managers.blackmarket:remove_item("preorder", "textures", mat_id, false)
end
for mat_id,_ in pairs(tweak_data.blackmarket.colors) do
managers.blackmarket:remove_item("preorder", "colors", mat_id, false)
end
end
end