🔃Server

takeMugshot

exports['pp-mdt']:takeMugshot(source)

--[[
    it will trigger mugshot cutscene, take photo and update it in database
]]

isWanted

local isWanted, info = exports['pp-mdt']:isWanted(type, identifier)

--[[
    Checks if a citizen, vehicle, weapon, case, or evidence is wanted.

    Parameters:
    - type (string): "citizen", "vehicle", "weapon", "case", or "evidence".
    - identifier (string): The unique identifier to check (user identifier, plate, weapon serialnumber, case id, evidence id).

    Returns:
    - (boolean, string/number): True and ID if wanted, false and "not-found" if not, "invalid-type" for a wrong type.
]]

getUserPatrol

local patrol = exports['pp-mdt']:getUserPatrol(identifier)

--[[
    It will return the patrol object if the user is currently assigned to a patrol.

    Parameters:
    - identifier (string): The unique identifier of the user to check.

    Returns:
    - (table or nil): The patrol object if the user is in a patrol, or nil if they are not.
]]

AddDispatchCall

exports['pp-mdt']:AddDispatchCall(data, source)

--[[
    Function: AddDispatchCall

    Adds a new dispatch call to the MDT system. This function handles the creation of a dispatch entry,
    including the caller's information, coordinates, and other relevant details. The dispatch call is then
    broadcasted to all clients.

    Parameters:
    - data (table): A table containing the dispatch call details such as title, description, blip information, and citizen data.
    - source (number): The player's server ID who initiated the dispatch call.
]]
-- Example usage:
exports['pp-mdt']:AddDispatchCall({
    title = 'Test',
    description = 'Test',
    showCitizen = 'name',
    coords = vec3(-1543.69, -1198.46, 1.22),
    duration = 5 * 60000,
    blip = {
        color = 1,
        sprite = 1,
        scale = 0.8,
    },
    code = {
        code = 'TEST',
        color = 'red'
    },
    flash = true,
}, source)

AddDashcam

local success = exports['pp-mdt']:AddDashcam(vehicle) 

--[[
    Function: AddDashcam

    Parameters:
        vehicle (entity): The vehicle entity to which the dashcam is added.
    
    Return:
        success (boolean): Returns `true` if the dashcam was successfully added and `false` if the addition failed.
]]

Last updated