Browse docs
Exports
This page documents supported public integration calls and usage examples. It does not expose or reproduce the resource's internal implementation.
Server Exports
All Advanced Pricing and Billing exports return a result table:
{
success = true,
data = {}
}
Rejected requests return success = false and a stable error code. Player identity, mechanic job, grade, permissions, vehicle distance, configured limits, quote state, invoice ownership, and monetary values are always resolved or validated on the server.
Advanced Pricing exports
| Export | Arguments | Purpose |
|---|---|---|
CreatePricingQuote | source, payload | Calculates a fresh server-authoritative quote for a nearby vehicle and configured tuning options |
GetPricingQuote | source, orderId | Returns the saved quote data for an accessible workshop order |
ValidatePricingQuote | source, orderId, vehicleNetId | Validates order state, expiry, proximity, procurement state, and quoted vehicle model |
GetSupplierCatalog | source | Returns the authorized mechanic's current Dynasty catalog with server-calculated supplier prices |
GetPricingAnalytics | source, periodDays? | Returns workshop pricing analytics when the mechanic has billing-management permission |
CreatePricingQuote(source, payload)
The caller supplies only the requested vehicle and tuning option identifiers. Client or integration values for vehicle price, supplier cost, labor, margin, tax, discount, grade, society, or final price are not accepted as authoritative.
local result = exports["sky_mechanicjob"]:CreatePricingQuote(source, {
vehicleNetId = NetworkGetNetworkIdFromEntity(vehicle),
vehicleClass = 7,
parts = {
{ id = "mod_11", value = 2 },
{ id = "mod_23", value = 4, wheelType = 7 }
}
})
if result.success then
print(("Server quote: $%s"):format(result.data.amount))
end
vehicleClass is only used as a validated compatibility fallback when the current server artifact cannot resolve the class from the networked vehicle. The server still validates the entity and the player's distance.
Reading and validating an order quote
local quote = exports["sky_mechanicjob"]:GetPricingQuote(source, order_id)
if not quote.success then return end
local validation = exports["sky_mechanicjob"]:ValidatePricingQuote(
source,
order_id,
vehicle_net_id
)
if validation.success then
print("The quote is valid for this vehicle")
end
Only a mechanic belonging to the order's workshop can read or validate its quote.
Supplier catalog and analytics
local catalog = exports["sky_mechanicjob"]:GetSupplierCatalog(source)
local analytics = exports["sky_mechanicjob"]:GetPricingAnalytics(source, 30)
The supplier catalog requires Parts Delivery access. Pricing analytics additionally require the billing-management permission and never accept a job name from the caller.
Advanced Billing exports
| Export | Arguments | Purpose |
|---|---|---|
CreateInvoice | source, payload | Creates a validated invoice for configured work, positions, or permitted manual lines |
CreateEstimate | source, payload | Creates a time-limited estimate using the same validation and price boundaries |
GetInvoice | source, invoiceId | Returns one invoice to its customer or an authorized workshop manager |
GetPlayerInvoices | source, limit? | Returns up to 100 invoices belonging to that player |
PayInvoice | source, payload | Pays the server-calculated balance or an allowed partial amount |
RespondToEstimate | source, payload | Accepts or declines an estimate owned by the player |
SendInvoiceReminder | source, payload | Sends a permission- and cooldown-checked overdue reminder |
CancelInvoice | source, payload | Cancels an unpaid document when the mechanic grade permits it |
GetBillingAnalytics | source, periodDays? | Returns the authorized workshop's accounting summary |
Creating an invoice or estimate
local invoice = exports["sky_mechanicjob"]:CreateInvoice(source, {
targetId = customer_source,
plate = "ABC123",
historyIds = { 481, 482 },
customPositionKeys = { "diagnostics" },
discountPercent = 5
})
local estimate = exports["sky_mechanicjob"]:CreateEstimate(source, {
targetId = customer_source,
manualItems = {
{
label = "Custom fabrication",
category = "bodywork",
costType = "labor",
quantity = 2,
unitPrice = 750
}
}
})
Manual positions, custom prices, discounts, document totals, and estimates must be enabled for the mechanic's grade. The customer must be online and within eight meters when targetId is used.
Reading and paying invoices
local invoice = exports["sky_mechanicjob"]:GetInvoice(source, invoice_id)
local invoices = exports["sky_mechanicjob"]:GetPlayerInvoices(source, 25)
local payment = exports["sky_mechanicjob"]:PayInvoice(
source,
{
invoiceId = invoice_id,
paymentMethod = "card",
amount = 500
}
)
The server loads the invoice owner and outstanding balance, enforces the deposit and minimum partial payment, removes the money, deposits workshop funds, records the payment, and updates the status. Supplying a larger amount cannot overpay the invoice.
Estimate and management actions
exports["sky_mechanicjob"]:RespondToEstimate(customer_source, {
invoiceId = estimate_id,
accepted = true
})
exports["sky_mechanicjob"]:SendInvoiceReminder(mechanic_source, {
invoiceId = invoice_id
})
exports["sky_mechanicjob"]:CancelInvoice(mechanic_source, {
invoiceId = invoice_id,
reason = "Created by mistake"
})
local analytics = exports["sky_mechanicjob"]:GetBillingAnalytics(mechanic_source, 30)
RegisterNetEvent. If a client UI needs an action, let the existing Mechanic callbacks perform the server-side validation.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-truewhen 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.
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-truewhen the repair was accepted.table | string- repair result on success or an error code on failure.
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 containingplate,mileage, andwear, ornilfor invalid input or a database failure.
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, ornilfor invalid input or a database failure.
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-truewhen the wear values were saved.table | string- repair result on success or an error code on failure.
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-truewhen saved tuning properties exist.
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, ornilif 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, ornilif 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:
| Export | Arguments | Returns | Purpose |
|---|---|---|---|
GetFakePlateState | netId | table | nil | Returns the current vehicle fake-plate statebag data |
ResolveRealPlateForPolice | netId, officerSource?, shouldAudit? | table | nil | Returns real/display identity and optionally writes the VIN-check audit |
ClearFakePlate | netId, reason? | boolean | Removes the fake plate and restores the real plate |
RestoreFakePlateState | netId, state, reason? | boolean, table | string | Validates and restores persisted fake-plate state |
ResolveRealPlateForGarageStore | netId | table | nil | Returns 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:
| Export | Arguments | Returns | Purpose |
|---|---|---|---|
ShouldCarryStorageItem | itemName | boolean | Checks whether an item uses the physical carry workflow |
CanReceiveCarryItem | source, itemName | boolean | Checks whether a player can receive that carried item |
GiveCarryItemFromStorage | source, itemName, metadata | boolean | Places a configured carry item in the player's carry state |
ConsumeCarryItem | source, itemName | boolean | Consumes the matching carried state after installation or deposit |
HasCarryItem | source, itemName | boolean | Checks 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
| Export | Arguments | Returns | Purpose |
|---|---|---|---|
GetDisplayPlate | vehicle | string | Returns the normalized plate displayed on the vehicle |
GetRealPlate | vehicle | string | Returns 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:
| Export | Arguments | Returns | Purpose |
|---|---|---|---|
GetNitroState | vehicle? | table | Returns the complete Nitro state for the supplied vehicle or the player's current vehicle |
HasNitro | vehicle? | boolean | Checks whether usable Nitro is installed |
IsNitroActive | vehicle? | boolean | Checks 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, ornilif 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 bysky_jobs_base.
Typical action IDs include:
access_liftopen_hoodtake_engine_hoistattach_engine_hoistengine_swapinstall_order_partsand_vehiclepaint_vehiclecar_jackdetach_wheelattach_wheelremove_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 bygetRadialActions().
- Returns:
boolean-trueon success,falseon failure.table?- optional error payload withkeyandfallback.
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.
Related Shared Exports
The mechanic script also depends heavily on sky_jobs_base and inherits its shared systems for creator placement, garages, storage, dispatch, and salary controls.
Support
Need help? Our support team is always ready to assist
Join Discord