SMX logo

SMX Documentation

Production-grade Script Knowledge Base

Build 2026.04 Live Docs



License

Free Scripts · FiveM Ready

Core Runtime Settings

Start with the framework and menu controls below, then adjust authority permissions.

Config.Framework = "esx"            -- "esx" or "qb"
Config.QBIdentifier = "citizenid"   -- qb: citizenid or license
Config.EnableMenu = true
Config.DocumentCardPosition = "middle-top"
Config.MenuPosition = "top-left"
Config.CloseMenuOnDocumentOpen = false

For QBCore, pick the identifier that matches how your user_licenses.owner values are stored.

Admin + Authority Permission Model

Script administration and authority actions are separated and can be controlled independently.

Config.AdminGroups = {
    admin = true,
    superadmin = true
}

Config.ManagementJobs = {
    police = true,
    doj = true,
    justice = true
}

Config.JobActionPermissions = {
    police = { inspect_id = true, confiscate_doc = true, issue_doc = true },
    doj = { inspect_id = true, confiscate_doc = true, issue_doc = true },
    justice = { inspect_id = true, confiscate_doc = true, issue_doc = true }
}

Admins can use command-level license management. Management jobs control the authority tab in the UI.

Document Type Access Control

You can restrict which document types a job is allowed to issue or confiscate.

Config.JobDocumentPermissions = {
    police = {
        issue = { "*" },
        confiscate = { "*" }
    }
}

Supported formats are wildcard, list, or map. If a job/action is not configured, all document types are allowed.

Document Definitions

Document cards are data-driven from Config.Documents, including styles, expiry and optional license requirements.

Config.Documents = {
    id = {
        label = "Identity Card",
        showPortrait = true,
        style = "identity",
        expiryDate = "31.07.2029",
        licenses = nil
    },
    driver = {
        label = "Driver License",
        showPortrait = true,
        style = "driver",
        expiryDate = "31.07.2029",
        licenses = {
            { label = "Class A (Motorcycle)", type = "drive_bike" },
            { label = "Class B (Car)", type = "drive" },
            { label = "Class C (Truck)", type = "drive_truck" }
        }
    }
}

Job-bound documents like police/ambulance/doj can be limited with allowedJobs.

Locale and Notification Stack

Language and notifications are also configurable in config.lua.

Config.Locale = "en"  -- "de" or "en"

Config.Notification = {
    provider = "esx", -- "esx", "qb", "ox_lib", "chat", "native"
    duration = 5000
}

The Config.Notify helper abstracts provider differences and is used by both client and server flows.