🔄Exports

🖥️ Client Exports

OpenMenu

Opens the tuning menu. The player must be inside a vehicle and within a tuning zone.

  • Returns: boolean (true if opened, false if not in zone or already open)

local opened = exports['m-TuningCreator']:OpenMenu()

CloseMenu

Closes the tuning menu. Optionally reverts all unsaved changes.

  • Parameters:

    • revert (boolean): if true, reverts all unapplied modifications

  • Returns: boolean (true if closed, false if menu was not open)

exports['m-TuningCreator']:CloseMenu(false) -- close and keep changes
exports['m-TuningCreator']:CloseMenu(true)  -- close and revert changes

IsMenuOpen

Checks if the tuning menu is currently open.

  • Returns: boolean

GetCurrentZone

Gets the ID of the tuning zone the player is currently inside.

  • Returns: number|nil (zone ID, or nil if not in any zone)

OpenAdmin

Opens the admin panel for zone management.

  • Returns: boolean

OpenPendingList

Opens the pending tuning orders list for a specific zone.

  • Parameters:

    • zoneIndex (number): the zone ID to show pending orders for

  • Returns: boolean (true if opened, false if no zoneIndex provided)

RepairVehicle

Triggers a vehicle repair (equivalent to the /mrepair command).

  • Returns: boolean

OpenVehStats

Opens the vehicle stats panel (equivalent to the /vehstats command).

  • Returns: boolean


🗄️ Server Exports

GetZone

Gets the data of a specific tuning zone by ID.

  • Parameters:

    • zoneId (number): the zone ID

  • Returns: table|nil (zone data table, or nil if not found)

GetAllZones

Gets all active (enabled) tuning zones.

  • Returns: table[] (array of zone data tables)

ReloadZones

Reloads all zones from the database and syncs them to all connected clients. Use this after modifying zones directly in the database.

CreateZone

Creates a new tuning zone programmatically and saves it to the database.

  • Parameters:

    • data (table): zone configuration

  • Returns: number|nil (new zone ID, or nil on failure)

Available fields in the data table:

Field
Type
Default
Description

name

string

'New Zone'

Zone display name

coords

table {x, y, z}

{0, 0, 0}

Zone center position

radius

number

15.0

Zone radius

blip

table

Map blip settings

blip.enable

boolean

false

Show blip on map

blip.sprite

number

72

Blip sprite ID

blip.color

number

3

Blip color ID

blip.scale

number

0.8

Blip scale

job

table

nil

Array of job names that can access the zone

vehicleBlacklist

table

nil

Array of vehicle models to block

vehicleWhitelist

table

nil

Array of vehicle models to allow (blocks all others)

identifiers

table

nil

Array of player identifiers allowed

freeJobs

table

nil

Array of job names that tune for free

prices

table

nil

Price overrides per mod category

societyPay

boolean

false

Send income to society fund

societyPayJob

string

nil

Job name for society fund

mechanicCommission

number

0

Commission percentage (0-100)

pendingOnly

boolean

false

Zone only accepts pending orders

pendingCoords

table {x, y, z}

nil

Pending order pickup location

pendingJobs

table

nil

Array of jobs that manage pending orders

pendingLabel

string

'Pending Tuning Orders'

Pending target label

enabled

boolean

true

Zone active state

Last updated