Browse docs

Events

Local server events emitted by the Sky Mechanic Job resource.

These events notify other server resources about completed mechanic actions. Listen with AddEventHandler. They are intentionally not registered as network events and cannot be triggered by clients.

They describe changes that have already been validated and committed. Consumers may use them for logs, phone notifications, dashboards, or external accounting, but should never use an event payload to perform the same payment or state transition a second time.

Advanced Pricing events

sky_mechanicjob:server:pricingQuoteCreated

Emitted after Advanced Pricing creates a quote for a tuning order or through the CreatePricingQuote server export.

FieldTypeDescription
sourcenumberRequesting player server ID
orderIdnumber?Saved order ID when the quote belongs to an order
orderUidstring?Public order identifier
societyJobstringServer-resolved workshop job
platestring?Saved vehicle plate
vehicleNetIdnumber?Network ID for an export-created preview
vehicleHashnumber?Server-resolved model hash
vehicleClassnumber?Validated vehicle class
amountnumberServer-calculated quote total
expiresAtnumber?Unix timestamp for the earliest expiring line
partCountnumberNumber of quoted tuning lines
originstringtuning_order or server_export
server.lua
AddEventHandler("sky_mechanicjob:server:pricingQuoteCreated", function(data)
    print(("Quote created for %s: $%s"):format(data.societyJob, data.amount))
end)

sky_mechanicjob:server:pricingQuoteExpired

Emitted when unlocked and unprocured order lines expire and are recalculated.

FieldTypeDescription
orderIdnumberSaved order ID
orderUidstringPublic order identifier
societyJobstringOwning workshop job
partIndexesnumber[]Recalculated order line indexes
recalculatedbooleanAlways true

sky_mechanicjob:server:supplierStockChanged

Emitted after a successful Dynasty procurement transaction changes virtual stock and demand.

FieldTypeDescription
societyJobstringOwning workshop job
itemNamestringProcured configured item
orderIdnumberBound tuning order ID
partIndexnumberBound tuning line index
itemIndexnumberRequired-item index inside the tuning line
stockDeltanumberStock change, currently -1
demandDeltanumberDemand change, currently 1

Advanced Billing events

EventEmitted after
sky_mechanicjob:server:invoiceCreatedAn invoice or estimate and all of its positions were saved
sky_mechanicjob:server:invoiceStatusChangedA document moved to another validated state
sky_mechanicjob:server:invoicePaymentRecordedMoney was removed, deposited, and the payment row was saved
sky_mechanicjob:server:estimateRespondedThe owning customer accepted or declined an estimate
sky_mechanicjob:server:invoiceOverdueAn unpaid issued document became overdue
sky_mechanicjob:server:invoiceReminderSentA permitted reminder and optional fee were saved
sky_mechanicjob:server:invoiceCancelledAn authorized mechanic cancelled an unpaid document

sky_mechanicjob:server:invoiceCreated

The payload contains invoiceId, invoiceUid, societyJob, documentType, status, issuerSource, optional customerSource, plate, subtotal, discount, tax, total, dueAt, and validUntil.

sky_mechanicjob:server:invoiceStatusChanged

The payload contains invoiceId, invoiceUid, societyJob, previousStatus, status, actorSource, and reason. Supported transitions include estimate acceptance, decline or expiry, partial/full payment, overdue processing, and cancellation.

server.lua
AddEventHandler("sky_mechanicjob:server:invoiceStatusChanged", function(data)
    print(("Invoice %s changed from %s to %s"):format(
        data.invoiceUid,
        data.previousStatus,
        data.status
    ))
end)

sky_mechanicjob:server:invoicePaymentRecorded

The payload contains invoiceId, invoiceUid, societyJob, payerSource, amount, paymentMethod, amountPaid, balanceDue, and the resulting status.

sky_mechanicjob:server:estimateResponded

The payload contains invoiceId, invoiceUid, societyJob, customerSource, and response (accepted or declined).

sky_mechanicjob:server:invoiceOverdue

The payload contains invoiceId, invoiceUid, and societyJob.

sky_mechanicjob:server:invoiceReminderSent

The payload contains invoiceId, invoiceUid, societyJob, actorSource, optional customerSource, fee, reminderCount, and balanceDue.

sky_mechanicjob:server:invoiceCancelled

The payload contains invoiceId, invoiceUid, societyJob, actorSource, and reason.

All events on this page are server-local TriggerEvent notifications. Keep consumers server-side and do not re-register these names with RegisterNetEvent.

sky_mechanicjob:server:vehicleRepaired

  • Purpose: Emitted after RepairVehicle accepted a full vehicle repair.
  • Payload:
    • netId (number) - vehicle network ID.
    • plate (string) - vehicle plate.
    • reason (string) - supplied repair reason.
    • wear (table) - repaired diagnostic wear values.
server.lua
AddEventHandler("sky_mechanicjob:server:vehicleRepaired", function(data)
    print(("Vehicle %s repaired: %s"):format(data.plate, data.reason))
end)

sky_mechanicjob:server:vehicleWearChanged

  • Purpose: Emitted when diagnostic wear is repaired or wear and mileage are saved.
  • Payload:
    • plate (string) - vehicle plate.
    • wear (table) - current diagnostic wear values.
    • mileage (number?) - current mileage when emitted by a mileage update.
    • repairedParts (table) - repaired wear part IDs.
    • fullRepair (boolean) - whether every wear part was repaired.
    • reason (string) - change reason.
    • source (number) - initiating player server ID, or 0 for a server export.
server.lua
AddEventHandler("sky_mechanicjob:server:vehicleWearChanged", function(data)
    if data.fullRepair then
        print(("All wear repaired for %s"):format(data.plate))
    end
end)

sky_mechanicjob:server:tuningChanged

  • Purpose: Emitted after saved tuning properties or Stance changed.
  • Payload:
    • plate (string) - vehicle plate.
    • properties (table) - current saved vehicle properties.
    • change (string) - properties or stance.
    • source (number) - initiating player server ID.
server.lua
AddEventHandler("sky_mechanicjob:server:tuningChanged", function(data)
    print(("%s tuning changed: %s"):format(data.plate, data.change))
end)

sky_mechanicjob:server:orderCompleted

  • Purpose: Emitted after the final open part of a tuning order was installed.
  • Payload:
    • source (number) - installing player server ID.
    • orderId (number) - numeric order ID.
    • orderUid (string?) - public order identifier.
    • partIndex (number) - index of the final installed part.
    • part (table) - final installed part data.
    • plate (string?) - vehicle plate.
    • status (string) - completed.
    • completed (boolean) - always true for this event.
server.lua
AddEventHandler("sky_mechanicjob:server:orderCompleted", function(data)
    print(("Order %s completed for %s"):format(data.orderId, data.plate or "UNKNOWN"))
end)

sky_mechanicjob:server:fakePlateChanged

  • Purpose: Emitted when a fake plate is applied, restored, or removed.
  • Payload:
    • netId (number) - vehicle network ID.
    • active (boolean) - whether the fake plate is active.
    • realPlate (string) - persistent real plate.
    • displayPlate (string?) - fake display plate.
    • reason (string) - change reason.
    • actorSource (number?) - initiating player server ID.
server.lua
AddEventHandler("sky_mechanicjob:server:fakePlateChanged", function(data)
    print(("Fake plate state for %s: %s"):format(data.realPlate, tostring(data.active)))
end)

Support

Need help? Our support team is always ready to assist

Join Discord