Browse docs

Exports

Client and server exports provided by the Sky Mechanic Job resource.

This page documents supported public integration calls and usage examples. It does not expose or reproduce the resource's internal implementation.

Server Exports

RepairVehicle(netId, reason?)

  • Purpose: Fully repairs a networked vehicle, realistic wheel damage, and all diagnostic wear.
  • Arguments:
    • netId (number) - FiveM network ID of the vehicle. Required.
    • reason (string?) - optional integration reason included in history and event payloads.
  • Returns:
    • boolean - true when the repair was accepted.
    • table | string - repair result on success or an error code on failure.

Saved vehicle properties, Stance, custom engine sound, Nitro, and other tuning are preserved.

server.lua
local success, result = exports["sky_mechanicjob"]:RepairVehicle(vehicle_net_id, "garage_service")

if not success then
    print(("Vehicle repair failed: %s"):format(result))
end

RepairWheelDamage(netId, reason?)

  • Purpose: Repairs only realistic wheel damage for a networked vehicle.
  • Arguments:
    • netId (number) - FiveM network ID of the vehicle. Required.
    • reason (string?) - optional integration reason returned in the result.
  • Returns:
    • boolean - true when the repair was accepted.
    • table | string - repair result on success or an error code on failure.
server.lua
local success, result = exports["sky_mechanicjob"]:RepairWheelDamage(
    vehicle_net_id,
    "roadside_assistance"
)

if not success then
    print(("Wheel repair failed: %s"):format(result))
end

GetVehicleCondition(plate)

  • Purpose: Returns the saved mileage and all diagnostic wear values for a vehicle.
  • Arguments:
    • plate (string) - vehicle plate text. Required.
  • Returns: table | nil - a table containing plate, mileage, and wear, or nil for invalid input or a database failure.
server.lua
local condition = exports["sky_mechanicjob"]:GetVehicleCondition("ABC123")

if condition then
    print(("Mileage: %s, engine oil: %.1f%%"):format(
        condition.mileage,
        condition.wear.engine_oil
    ))
end

GetVehicleWear(plate)

  • Purpose: Returns all saved diagnostic wear values for a vehicle.
  • Arguments:
    • plate (string) - vehicle plate text. Required.
  • Returns: table | nil - the wear table, or nil for invalid input or a database failure.
server.lua
local wear = exports["sky_mechanicjob"]:GetVehicleWear("ABC123")

if wear then
    print(("Brake pads: %.1f%%"):format(wear.brake_pads))
end

RepairVehicleWear(plate, parts?, reason?)

  • Purpose: Repairs all or selected diagnostic wear without changing physical vehicle damage or tuning.
  • Arguments:
    • plate (string) - vehicle plate text. Required.
    • parts (table?) - optional list or keyed table of wear part IDs. Omit it to repair every part.
    • reason (string?) - optional integration reason included in history and event payloads.
  • Returns:
    • boolean - true when the wear values were saved.
    • table | string - repair result on success or an error code on failure.
server.lua
local success, result = exports["sky_mechanicjob"]:RepairVehicleWear("ABC123", {
    "engine_oil",
    "brake_pads"
}, "service_invoice")

if not success then
    print(("Wear repair failed: %s"):format(result))
end

Supported wear part IDs are tyres, brake_pads, suspension, spark_plugs, engine_oil, coolant, brake_fluid, transmission_fluid, clutch, air_filter, traction_battery, inverter, and catalytic_converter.

IsVehicleModified(plate)

  • Purpose: Checks whether saved mechanic tuning properties exist for a vehicle.
  • Arguments:
    • plate (string) - vehicle plate text. Required.
  • Returns: boolean - true when saved tuning properties exist.
server.lua
local modified = exports["sky_mechanicjob"]:IsVehicleModified("ABC123")

if modified then
    print("Vehicle has saved mechanic tuning")
end

GetVehicleTuning(plate)

  • Purpose: Returns the saved vehicle tuning properties for the supplied plate.
  • Arguments:
    • plate (string) - vehicle plate text. Required.
  • Returns: table | nil - the decoded tuning properties, or nil if no record exists.
local tuning = exports["sky_mechanicjob"]:GetVehicleTuning("ABC123")

if tuning then
    print(json.encode(tuning))
end

GetVehicleMileage(plate)

  • Purpose: Returns the saved vehicle mileage for the supplied plate.
  • Arguments:
    • plate (string) - vehicle plate text. Required.
  • Returns: number | nil - the saved mileage, or nil if no mileage record exists.
local mileage = exports["sky_mechanicjob"]:GetVehicleMileage("ABC123")

if mileage then
    print(("Mileage: %s"):format(mileage))
end

Fake plate server exports

These calls let server-side garage and Police integrations resolve, clear, persist, and restore fake-plate state:

ExportArgumentsReturnsPurpose
GetFakePlateStatenetIdtable | nilReturns the current vehicle fake-plate statebag data
ResolveRealPlateForPolicenetId, officerSource?, shouldAudit?table | nilReturns real/display identity and optionally writes the VIN-check audit
ClearFakePlatenetId, reason?booleanRemoves the fake plate and restores the real plate
RestoreFakePlateStatenetId, state, reason?boolean, table | stringValidates and restores persisted fake-plate state
ResolveRealPlateForGarageStorenetIdtable | nilReturns the real/display plate and configured garage-reset policy
local resolved = exports["sky_mechanicjob"]:ResolveRealPlateForGarageStore(net_id)

if resolved then
    print(("Store vehicle under real plate %s"):format(resolved.realPlate))
end

See Fake Plate Integration for the required consumer fxmanifest.lua, the native/helper alternatives, and the complete garage storage and restore lifecycle.

Carry-item server exports

The physical carry-item integration exposes these server calls:

ExportArgumentsReturnsPurpose
ShouldCarryStorageItemitemNamebooleanChecks whether an item uses the physical carry workflow
CanReceiveCarryItemsource, itemNamebooleanChecks whether a player can receive that carried item
GiveCarryItemFromStoragesource, itemName, metadatabooleanPlaces a configured carry item in the player's carry state
ConsumeCarryItemsource, itemNamebooleanConsumes the matching carried state after installation or deposit
HasCarryItemsource, itemNamebooleanChecks whether the player currently carries the matching item
if exports["sky_mechanicjob"]:CanReceiveCarryItem(source, "engine") then
    exports["sky_mechanicjob"]:GiveCarryItemFromStorage(source, "engine", {})
end

Client Exports

Fake plate client exports

ExportArgumentsReturnsPurpose
GetDisplayPlatevehiclestringReturns the normalized plate displayed on the vehicle
GetRealPlatevehiclestringReturns the normalized persistent real plate
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
local real_plate = exports["sky_mechanicjob"]:GetRealPlate(vehicle)
local display_plate = exports["sky_mechanicjob"]:GetDisplayPlate(vehicle)

Police-facing interfaces normally use display_plate; ownership and garage lookups use real_plate.

Nitro HUD exports

The Nitro runtime exposes these client calls for external HUDs and vehicle scripts:

ExportArgumentsReturnsPurpose
GetNitroStatevehicle?tableReturns the complete Nitro state for the supplied vehicle or the player's current vehicle
HasNitrovehicle?booleanChecks whether usable Nitro is installed
IsNitroActivevehicle?booleanChecks whether Nitro is currently boosting and consuming
local nitro = exports["sky_mechanicjob"]:GetNitroState()

if nitro.installed then
    print(("Nitro: %.1f%%"):format(nitro.percent))
end

For live updates, listen to the local sky_mechanicjob:nitroStateChanged client event. See External Nitro HUD for all payload fields and a complete NUI example.

GetVehicleMileage(vehicleOrPlate)

  • Purpose: Returns the saved vehicle mileage for the supplied vehicle or plate.
  • Arguments:
    • vehicleOrPlate (number | string) - vehicle entity handle or vehicle plate text. Required.
  • Returns: number | nil - the saved mileage, or nil if no mileage record exists.
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
local mileage = exports["sky_mechanicjob"]:GetVehicleMileage(vehicle)

if mileage then
    print(("Mileage: %s"):format(mileage))
end

getRadialActions()

  • Purpose: Returns the currently available mechanic radial actions for the active install flow.
  • Returns: table[] - radial action definitions used by sky_jobs_base.

Typical action IDs include:

  • access_lift
  • open_hood
  • take_engine_hoist
  • attach_engine_hoist
  • engine_swap
  • install_order_part
  • sand_vehicle
  • paint_vehicle
  • car_jack
  • detach_wheel
  • attach_wheel
  • remove_car_jack
local actions = exports["sky_mechanicjob"]:getRadialActions()

triggerRadialMenuAction(actionId)

  • Purpose: Executes a supported mechanic radial action programmatically.
  • Arguments:
    • actionId (string) - one of the radial action IDs exposed by getRadialActions().
  • Returns:
    • boolean - true on success, false on failure.
    • table? - optional error payload with key and fallback.
local ok, err = exports["sky_mechanicjob"]:triggerRadialMenuAction("access_lift")

if not ok and err then
    print(err.fallback)
end

TryDepositCarryItemToStorage(stationId)

Attempts to deposit the currently carried mechanic item or nearby delivery pallet into the selected workshop storage. Returns true when the export handled a matching carry/delivery state and false when there was nothing to deposit.

local handled = exports["sky_mechanicjob"]:TryDepositCarryItemToStorage(stationId)

SetFluidLeakProvider(resourceName, serverEvent)

Overrides the configured vehicle-fluid provider for the current client. The provider resource must be started, and its server event must accept the documented vehicle-fluid payload. Returns false when either argument is empty.

local success = exports["sky_mechanicjob"]:SetFluidLeakProvider(
    GetCurrentResourceName(),
    "my_spill_resource:createFromVehicle"
)

ResetFluidLeakProvider()

Clears the runtime override and restores Config.OilLeaks.integration.

exports["sky_mechanicjob"]:ResetFluidLeakProvider()

See Vehicle Fluid Leaks for the provider payload and complete setup.

The mechanic script also depends heavily on sky_jobs_base and inherits its shared systems for creator placement, garages, storage, dispatch, and salary controls.

See the Sky Jobs Base Server Exports page for shared integrations like dispatch creation, external garage registration, and salary pause/resume.

Support

Need help? Our support team is always ready to assist

Join Discord