GE Lua Documentation

Press F to search!

removeVehicle

Definition


-- @/lua/ge/extensions/gameplay/parking.lua:552

local function removeVehicle(id) -- removes a vehicle from the parked cars table
  if parkedVehData[id] then
    parkedVehData[id] = nil
    parkedVehIds = tableKeysSorted(parkedVehData)
  end
end

Callers

@/lua/ge/extensions/editor/vehicleEditor/liveEditor/vePropTransformer.lua

local function removeVehicle(vehID)
  if vehID == -1 then return end
local function onVehicleSpawned(id)
  removeVehicle(id)
  switchVehicle(id)
@/lua/ge/extensions/career/modules/inventory.lua

local function removeVehicle(inventoryId)
  removeVehicleObject(inventoryId)
      else
        M.removeVehicle(inventoryId)
      end
  career_modules_playerAttributes.addAttributes({money=value}, {tags={"vehicleSold","selling"},label="Sold a vehicle: "..(vehicle.niceName or "(Unnamed Vehicle)")})
  removeVehicle(inventoryId)
  Engine.Audio.playOnce('AudioGui','event:>UI>Career>Buy_01')
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veFlexbodyDebug.lua

local function removeVehicle(vehID)
  if vehID == -1 then return end
local function onVehicleSpawned(id)
  removeVehicle(id)
end
@/lua/ge/extensions/editor/aiTests.lua

local function removeVehicle(id) -- removes an AI vehicle
  if not id or not vehicles[id] then return end
    for _, v in ipairs(_del) do
      removeVehicle(v)
    end
    if im.Button("Remove From List##aiParams") then
      removeVehicle(currId)
      selectVehicle(vehicleIds[1])
@/lua/ge/extensions/career/modules/loanerVehicles.lua
  end
  career_modules_inventory.removeVehicle(inventoryId)
end
@/lua/ge/extensions/career/modules/vehicleShopping.lua
  if purchaseData.tradeInVehicleInfo then
    career_modules_inventory.removeVehicle(purchaseData.tradeInVehicleInfo.id)
  end