๐Server
getUserPatrol
local patrol = exports['pp-ems-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-ems-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-ems-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)Field Name
Data Type
Description
Required
Last updated