SMX logo

SMX Documentation

Production-grade Script Knowledge Base

Build 2026.04 Live Docs



Workstation

Scripts · FiveM Ready

Core Setup

Config.Locale = "en"
Config.Framework = "esx"   -- esx, esxold, qbcore
Config.InteractionDistance = 1.5

Config.Crafting = {
    minAmount = 1,
    defaultRecipeTime = 10,
    defaultMaxAmount = 10,
    pauseOnDisconnect = true,
    allowParallelOnStation = true,
    requireCarryCapacity = true
}

These values define framework bridge mode, station interaction radius and crafting queue behavior.

Security and Cooldowns

Config.Security = {
    strictTypes = true,
    maxStationDistance = 3.5,
    requireProximityOnCollect = true,
    startCooldownMs = 800,
    finishCooldownMs = 600
}

Security checks are enforced server-side for start and finish actions to prevent payload abuse and long-range triggering.

Station and Recipe Definitions

-- config.stations.lua
Config.Workstations["weapon_mod_station"] = {
    label = "Weapon Modification",
    description = "Craft weapons and utility items from materials.",
    coords = vector3(1120.5, -2002.6, 31.0),
    access = false,
    categories = {
        { id = "materials", label = "Materials" },
        { id = "weapons", label = "Weapons" },
        { id = "utility", label = "Utility" }
    },
    recipes = {}
}
-- config.recipes.lua
{
    id = "util_bandage",
    category = "utility",
    label = "Bandage",
    item = "bandage",
    ingredients = {
        { item = "cloth", count = 2 },
        { item = "alcohol", count = 1 }
    },
    time = 12,
    maxAmount = 20
}

Recipe ids should remain unique per station. Categories not declared on station level are added dynamically at runtime.

UI and Marker Settings

Config.ItemImages = {
    basePath = "nui://smx-inventory/html/assets/items/",
    fileType = "png"
}

Config.Branding = {
    showLogo = false,
    logoPath = ""
}

Config.DefaultMarker = {
    type = 2,
    scale = vector3(0.5, 0.5, 0.5),
    color = { r = 90, g = 175, b = 255 },
    drawDistance = 10.0
}

Item icon rendering can be linked to your inventory icon package by adjusting base path and file extension.