OffRoader23 Posted February 21, 2008 Share Posted February 21, 2008 OK, I'm trying to fix the freeroam gui because if theres a car with fog lights as an upgrade it shows NO upgrades, I want it to ignore the fog light upgrades when it finds the list, or just remove them from the list completely. Is there a way I can do this? Code: function upgradesInit() local vehicle = getPlayerOccupiedVehicle(g_Me) if not vehicle then errMsg('Please enter a vehicle to change the upgrades of.') closeWindow(wndUpgrades) return end local installedUpgrades = getVehicleUpgrades(vehicle) local compatibleUpgrades = {} local slotName, group for i,upgrade in ipairs(getVehicleCompatibleUpgrades(vehicle)) do slotName = getVehicleUpgradeSlotName(upgrade) group = table.find(compatibleUpgrades, 'name', slotName) if not group then group = { 'group', name = slotName, children = {} } table.insert(compatibleUpgrades, group) else group = compatibleUpgrades[group] end table.insert(group.children, { id = upgrade, installed = table.find(installedUpgrades, upgrade) ~= false }) end table.sort(compatibleUpgrades, function(a, b) return a.name < b.name end) bindGridListToTable(wndUpgrades, 'upgradelist', compatibleUpgrades, true) end Any help would be really be appreciated. The upgrade IDs for the fog lights, 1013 and 1024. Link to comment
OffRoader23 Posted February 21, 2008 Author Share Posted February 21, 2008 Wow nevermind, I'm stupid. I fixed it. Just added if upgrade ~= 1013 and ~= 1024 and it worked. This can be closed. Link to comment
Recommended Posts