Jump to content

Free Roam Gui help


OffRoader23

Recommended Posts

Posted

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.

[NR]OffRoader23 - Leader of [NR] Gaming Clan

Server: 194.187.212.136:10000

Free Roam Chaos, with MANY commands, a DM arena, and a great team system.

blue2.png

Posted

Wow nevermind, I'm stupid. I fixed it. Just added if upgrade ~= 1013 and ~= 1024 and it worked. This can be closed. :D

[NR]OffRoader23 - Leader of [NR] Gaming Clan

Server: 194.187.212.136:10000

Free Roam Chaos, with MANY commands, a DM arena, and a great team system.

blue2.png

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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