Kartik Scripts

Get Citizen

Fetches a citizen's MDT profile. Works for both online and offline players by querying framework data and the MDT database.

Export Syntax

exports['kartik-mdt']:GetCitizen(citizenId)

Parameters

ParameterTypeRequiredDescription
citizenIdstringYesThe citizen's unique State ID/Citizen ID

Return Value

  • Returns table containing citizen profile details, or false if not found in the database:
{
    citizenId    = string,
    firstname    = string,
    lastname     = string,
    name         = string,   -- "Firstname Lastname"
    phone        = string,
    warrant      = number,   -- 0 = none, 1 = active warrant
    isDangerous  = number,   -- 0 or 1
    fingerprint  = string,   -- or "Not Registered"
    dna          = string,   -- or "Not Registered"
    strikePoints = number,
    licenses     = table,    -- array of { name, type, status }
}

Example Usage

local citizenId = "QBX000123"
local profile = exports['kartik-mdt']:GetCitizen(citizenId)

if profile then
    if profile.warrant == 1 then
        print(string.format("WARNING: %s has an active warrant!", profile.name))
    else
        print(string.format("Found profile for %s", profile.name))
    end
else
    print("No profile found for Citizen ID.")
end

On this page