SMX logo

SMX Documentation

Production-grade Script Knowledge Base

Build 2026.04 Live Docs



Workstation

Scripts · FiveM Ready

Installation Blueprint

Step 1: Place Resource

Extract to resources/[smx]/smx-workstation.

Step 2: Import SQL

Import workstation.sql to create the workstation_crafting table.

Step 3: Configure Framework

Set Config.Framework to esx, esxold or qbcore.

Step 4: Configure Station + Recipes

Adjust station entries in config.stations.lua and recipe definitions in config.recipes.lua.

Step 5: Validate Runtime

Start one craft, reconnect, and verify active crafting resume behavior.

Recommended server.cfg Order

ensure oxmysql
ensure es_extended   # if Framework = esx/esxold
ensure qb-core       # if Framework = qbcore
ensure smx-workstation

The resource loads the DB layer directly in fxmanifest.lua, so oxmysql must be available before startup.

Database and Migration Notes

Main table: workstation_crafting with player identifier, station key, recipe id, item, amount and timing metadata.

On startup, the script checks whether column recipe_id exists and applies an automatic ALTER TABLE migration when required.

Important: Recipe items and ingredient items must exist in your framework inventory system, otherwise crafting cannot start or finish correctly.