Deltarix Scripts
TebexDiscord
  • Information
    • About Me - Deltarix
  • Keymaster
    • FiveM Asset Escrow
    • Authentication
    • Transfers
  • Paid Assets
    • MDT V2
      • Setup
      • Locales
      • Configurations
        • Server
        • Client
        • Settings
        • 10 Codes
        • Commands
      • Exports
        • Server
          • OpenMDT
          • OpenVehicleDetailsInMDT
          • GetStateId
          • GetOfficer
          • GetPlayerWanted
          • GetPlateFlagged
          • GetOfficerSuspended
          • GetWeaponRegistered
          • GetOfficerClockedIn
          • GetClosestCamera
          • CreateWeapon
          • CreateOfficer
          • DeleteOfficer
          • UpdateCitizenData
          • UpdateCitizenPoints
          • ToggleCamera
          • ToggleCameraTimeout
          • ToggleClock
        • Client
          • OpenMDT
          • InsertPhotoToGallery
      • Bridges
        • Server
          • Framework
            • es_extended
            • qb-core
            • qbx_core
          • Garage
            • esx_garage
            • qb-garages
            • qbx_garages
          • Inventory
            • ox_inventory
            • qb-inventory
          • Licence
            • es_extended
            • qb-core
            • qbx_core
          • Property
            • esx_property
            • qb-apartments
            • qbx_apartments
          • Utilities
            • Logger
        • Client
          • Garage
            • esx_garage
            • qb-garages
            • qbx_garages
          • Utilities
            • Camera
      • Dependencies
      • Known Bugs
      • Common Issues and Troubleshooting
    • Dispatch
      • Exports
        • Server
          • Notifications
          • IsDispatcher
          • GetDispatchersByGroup
          • GetGroups
          • GetStateId
        • Client
          • defaultNotification
          • officerNotification
          • dispatchNotification
          • Copy of dispatchNotification
      • Dependencies
Powered by GitBook
On this page

Was this helpful?

  1. Paid Assets
  2. MDT V2
  3. Exports
  4. Server

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 1 year ago

Was this helpful?