TC ScriptDocumentation

Exports and API

What your other scripts can call or read: OpenTablet, statebags, commands.

tc-mechanic deliberately exposes little: logic stays server-side and encrypted. Here is what is intended for integration.

#Client export: OpenTablet

Opens the workshop tablet with the same controls as /atelier.

Lua
exports['tc-mechanic']:OpenTablet()              -- “dashboard” tab
exports['tc-mechanic']:OpenTablet('orders')      -- specific tab
ParameterValues
tab (optional)dashboard (default), orders, diagnostic, history, atelier

Example: a button in your job menu, or a TC Context Menu option:

Lua
tcmenu.add({
    label = 'Open the tablet', types = { 'vehicle' },
    require = { jobs = { mechanic = 0 } },
    onSelect = function() exports['tc-mechanic']:OpenTablet('orders') end,
})

#Statebags (read-only)

Written by the server only; you can read them client-side.

StatebagContent
tc_wearVehicle wear
tc_extrasOptions outside properties (finishes, special tyres)
tc_orderOrder in progress on the vehicle
Lua
local wear = Entity(vehicle).state.tc_wear
Warning

Do not write these statebags from the client: they belong to the server, which recomputes them.

#Optional integrations

ResourceActivationEffect
tc-comptaConfig.Integrations.comptaPartner contracts (discounts) at billing
tc-logsConfig.Integrations.logs, channel Config.LogsWebhookJournal copied to Discord

#Customising the bridge

All framework compatibility is in bridge/ (in clear text). To adapt invoicing, the cash account or vehicle reading, use Config.Bridge.Standalone (see Configuration).

Last updated : 7 November 2026© 2026 TC Script