Skip to content

Developer API & Events

Ali Baba edited this page Jan 6, 2026 · 2 revisions

πŸ’» Developer API & Technical Documentation

This page is designed for developers who want to integrate Advanced Auto Repair Wash System ESX with other scripts, such as custom radial menus, VIP systems, or admin tools.


πŸ”Œ Server-Side Events

You can trigger these events from other scripts to interact with the repair or wash logic.

esx_auto_repair:server:syncVehicle

This event synchronizes the repair or wash status across all players on the server.

  • Usage: TriggerServerEvent('esx_auto_repair:server:syncVehicle', vehicleNetId, type)
  • Types: Use 'repair' for fixing the engine or 'wash' for cleaning.

πŸ“‘ Client-Side Exports

Use these exports to check the player's status or integrate with external UI/Menus.

-- Returns true if the player is currently performing an action (Repairing/Washing)
local isBusy = exports['esx_auto_repair']:isBusy()

if isBusy then
    print("Action in progress - Menu access blocked!")
end

πŸ“œ Discord Webhook Structure

The script sends a structured JSON payload to your Discord Webhook for every transaction.

Data logged includes:

  • Player Info: Name, License, and Job.
  • Vehicle Info: License Plate and Engine Health.
  • Service Details: Type (Repair/Wash) and Duration.
  • Economy: Total Cost and Payment Method (Cash/Bank).

⚑ Optimization Specs

This script is built for high-performance servers:

  • Idle State: 0.00ms resmon usage.
  • Active State: 0.02ms - 0.04ms (only during active particle effects and 3D sound loops).
  • Network Traffic: Optimized to only sync necessary data to nearby players to minimize server lag.

Caution

Performance Warning This script is highly optimized using state-aware loops. Do NOT add Wait(0) or unnecessary Tick handlers in the client-side code, as it will break the 0.00ms idle performance.

Tip

Integration Tip: To integrate with a Custom Radial Menu, simply trigger the esx_auto_repair:client:startAction event when the player's vehicle is inside a valid zone.

πŸ“– Documentation

πŸ†˜ Help & Support


Version: 1.0.0 Status: Stable

Clone this wiki locally