Jump to content

Free Roam Gui help


OffRoader23

Recommended Posts

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
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...