CreateOfficer


Create new officer to the database

-- @param officer: { source = int, stateid = string }
-- @param alias: string
-- @param callsign: string
-- @param badgenumber: string
-- @param image: string
-- @param department: int
-- @param rank: int
-- @param roles: table
-- @return boolean: Whether the officer was created or not.
exports.drx_mdt:CreateOfficer()

Example using source

local function createOfficerBySource(source)
  local result = exports.drx_mdt:CreateOfficer({ source = source }, 'alias', 'callsign', 'badgenumber', 'image', 1, 1, { 1, 2, 3 })
end

Example using stateid

local function createOfficerByStateid(source)
  local stateid = exports.drx_mdt:GetStateId({ source = source })
  local result = exports.drx_mdt:CreateOfficer({ stateid = stateid }, 'alias', 'callsign', 'badgenumber', 'image', 1, 1, { 1, 2, 3 })
end

Last updated

Was this helpful?