ID Cards & Licenses
Commands, Exports & Events
Commands, Exports & Events for ID Cards & Licenses.
Commands
| Command | Who | Description |
|---|---|---|
/checklicense | police | Opens 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 suspendedExports (client)
lua
exports.lg_idcard:OpenShop()
exports.lg_idcard:OpenPoliceMenu() -- job is checked on the serverEvents
| Event | Side | Description |
|---|---|---|
lg_idcard:client:openBuyMenu | client | Opens the shop |
lg_idcard:server:documentIssued | server (listen) | (source, docType, docId) |
lg_idcard:server:licenseUpdated | server (listen) | (citizenId, status, untilTime, officerName) |
Last updated