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

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

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

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

AdminRepairVehicle(vehicle?)

Runs the protected full-repair flow for the supplied vehicle or the local player's current vehicle. It repairs normal vehicle damage, realistic wheel damage, and configured diagnostic wear state.

Returns true, result on success or false, errorCode on failure.

local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
local success, result = exports["sky_mechanicjob"]:AdminRepairVehicle(vehicle)

The calling player must pass the configured adminrepair permission check when using the administrator command/event flow.

FixWheelDamage(vehicle?)

Repairs realistic wheel damage on the supplied vehicle or the local player's driven vehicle. Returns true when a valid vehicle was repaired.

exports["sky_mechanicjob"]:FixWheelDamage(vehicle)

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