OffRoader23 Posted February 21, 2008 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. [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.
OffRoader23 Posted February 21, 2008 Author 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. [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.
Recommended Posts