ID Cards & Licenses

Commands, Exports & Events

Commands, Exports & Events for ID Cards & Licenses.

View in store

Commands

CommandWhoDescription
/checklicensepoliceOpens the license database

Exports (server)

lua
exports.lg_idcard:GiveDocument(source, 'driver_license')   -- free document (e.g. from a driving school)
local docs = exports.lg_idcard:GetDocuments(citizenId)     -- { { doc_id, doc_type, first_name, last_name, issued_at, expires_at }, ... }
local status = exports.lg_idcard:GetLicenseStatus(citizenId) -- { status = 'Valid'|'Warning'|'Suspended', untilTime, setBy }
exports.lg_idcard:SetLicenseStatus(citizenId, 'Suspended', os.time() + 86400, 'Judge')
local valid = exports.lg_idcard:HasValidDocument(source, 'driver_license') -- owns it, not expired, not suspended

Exports (client)

lua
exports.lg_idcard:OpenShop()
exports.lg_idcard:OpenPoliceMenu()   -- job is checked on the server

Events

EventSideDescription
lg_idcard:client:openBuyMenuclientOpens the shop
lg_idcard:server:documentIssuedserver (listen)(source, docType, docId)
lg_idcard:server:licenseUpdatedserver (listen)(citizenId, status, untilTime, officerName)

Last updated