RX Scripts Logo
Garage

Functions

Client-side garage functions supporting multiple garage systems.

The Garage adapter provides unified garage operations across multiple systems.

Functions

open

Opens a garage menu.

FM.garage.open(garageId, coords)
garageId
string|number required

Garage identifier or name

coords
vector3

Garage coordinates (optional, used by some garage systems)

Example:

-- Open a garage
FM.garage.open("legion_garage")

-- Open with coordinates
FM.garage.open("city_garage", vector3(100.0, 200.0, 20.0))

parkVehicle

Parks the current vehicle in a garage.

FM.garage.parkVehicle(garageId)
garageId
string|number required

Garage identifier where to park the vehicle

Returns: boolean|nil - True if vehicle was parked successfully

Example:

local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if vehicle ~= 0 then
    if FM.garage.parkVehicle("legion_garage") then
        FM.framework.notify("Vehicle parked successfully", "success")
    else
        FM.framework.notify("Failed to park vehicle", "error")
    end
end

Exports

Garage functions are available as exports:

exports['fmLib']:garage_open(garageId, coords)
exports['fmLib']:garage_parkVehicle(garageId)