Commands#
/mechanicmap#
Changes the active workshop map layer.
/mechanicmap [0-2]Available values:
Value | Description |
|---|---|
| Default workshop |
| Workshop with event decoration |
| Workshop with event + food area |
The command automatically saves the new state and synchronizes it with all connected players.
Server Events#
Request Current State#
Client event used to request the current active map state.
TriggerServerEvent('mechanicmap:requestState')The server responds with the current configuration.
Update Map State#
Client event used to update the local workshop layer.
TriggerClientEvent(
'mechanicmap:setState',
source,
mapId
)Parameters:
Parameter | Type | Description |
|---|---|---|
| number | Active map layer |
Available values:
0 = Disabled
1 = Event
2 = Event + FoodOptional Exports#
By default, Quasar Downtown Mechanic does not include exports.
The recommended integration method is using:
ExecuteCommand('mechanicmap 1')from another server resource.
Example:
ExecuteCommand('mechanicmap 2')This method keeps the state synchronized and saves the selected layer permanently.
Adding Custom Exports#
If you want to control the workshop from another resource using exports, you can add your own exports inside server.lua.
Example:
exports('SetMechanicMap', function(mapId)
ExecuteCommand(
'mechanicmap ' .. mapId
)
end)Then call it from another resource:
exports['qs_downtown_mechanic']:SetMechanicMap(2)This allows custom scripts such as:
Mechanic job events.
Server events.
Seasonal decorations.
Roleplay scenarios.


