GE Lua Documentation

Press F to search!

teleportToGarage

Definition


-- @/lua/ge/extensions/freeroam/facilities.lua:261

local function teleportToGarage(garageId, veh, resetVeh)
  local pos, rot = getGaragePosRot({id = garageId}, veh)
  if pos and rot then
    spawn.safeTeleport(veh, pos, rot, nil, nil, nil, true, resetVeh)
    core_camera.resetCamera(0)
    extensions.hook("onTeleportedToGarage", garageId, veh)
    if core_groundMarkers.currentlyHasTarget() then
      freeroam_bigMapMode.setNavFocus(core_groundMarkers.endWP[1])
    end
  end
end

Callers

@/lua/ge/extensions/career/modules/inventory.lua
            local garage = getClosestGarage(location.pos)
            freeroam_facilities.teleportToGarage(garage.id, veh)
            job.sleep(0.1)
      else
        freeroam_facilities.teleportToGarage("servicestationGarage", getPlayerVehicle(0))
      end
        local closestGarage = getClosestGarage()
        freeroam_facilities.teleportToGarage(closestGarage.id, vehObj, false)
        career_modules_fuel.minimumRefuelingCheck(vehObj:getId())
@/lua/ge/extensions/core/recoveryPrompt.lua
        atFadeFunction = function(target)
          career_modules_playerDriving.teleportToGarage(garage.id, scenetree.findObjectById(target.vehId), false)
@/lua/ge/extensions/career/modules/insurance/insurance.lua
      if not vehObj then return end
      freeroam_facilities.teleportToGarage(career_modules_inventory.getClosestGarage().id, vehObj, false)
    end)
@/lua/ge/extensions/career/modules/playerDriving.lua

local function teleportToGarage(garageId, veh, resetVeh)
  freeroam_facilities.teleportToGarage(garageId, veh, resetVeh)
local function teleportToGarage(garageId, veh, resetVeh)
  freeroam_facilities.teleportToGarage(garageId, veh, resetVeh)
  freeroam_bigMapMode.navigateToMission(nil)
@/lua/ge/extensions/career/modules/vehiclePerformance.lua
        if vehObj then
          freeroam_facilities.teleportToGarage(closestGarage, vehObj, false)
        end