SMX logo

SMX Documentation

Production-grade Script Knowledge Base

Build 2026.04 Live Docs



License

Free Scripts · FiveM Ready

Typical Runtime Flow

1. Open Menu

Player uses /docmenu to load personal documents and authority tab (if job is allowed).

2. Show Document

Player selects document and chooses self-view or nearby-view. Server validates ownership and restrictions.

3. Authority Action

Management jobs open player picker and execute inspect/confiscate/issue actions with range checks.

4. Persisted State

Confiscations, business company names, and mugshots persist in dedicated tables.

Integration Examples

Use event/callback integration when connecting custom job UIs or admin tools.

-- Open own identity card
TriggerServerEvent("smx-license:server:showCard", "id", nil)

-- Open driver license for nearest player serverId
TriggerServerEvent("smx-license:server:showCard", "driver", targetServerId)

-- Request menu payload from client-side context
ESX.TriggerServerCallback("smx-license:server:getMenuData", function(data)
    print(json.encode(data))
end)

For QBCore mode, the script internally maps callbacks via QBCore.Functions.CreateCallback.

Admin Examples

Command usage for live operations:

/addlicense 12 weapon
/addlicense 12 business "Pillbox Imports"
/removelicense 12 weapon

Business license creation should include a company string; otherwise validation rejects it.