🔄Exports
🖥️ Client Exports
OpenMenu
OpenMenuOpens 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
CloseMenuCloses 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 changesIsMenuOpen
IsMenuOpenChecks if the tuning menu is currently open.
Returns:
boolean
GetCurrentZone
GetCurrentZoneGets the ID of the tuning zone the player is currently inside.
Returns:
number|nil(zone ID, or nil if not in any zone)
OpenAdmin
OpenAdminOpens the admin panel for zone management.
Returns:
boolean
OpenPendingList
OpenPendingListOpens 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
RepairVehicleTriggers a vehicle repair (equivalent to the /mrepair command).
Returns:
boolean
OpenVehStats
OpenVehStatsOpens the vehicle stats panel (equivalent to the /vehstats command).
Returns:
boolean
🗄️ Server Exports
GetZone
GetZoneGets 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
GetAllZonesGets all active (enabled) tuning zones.
Returns:
table[](array of zone data tables)
ReloadZones
ReloadZonesReloads all zones from the database and syncs them to all connected clients. Use this after modifying zones directly in the database.
CreateZone
CreateZoneCreates 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:
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