Redutzu's Scripts
  • â„šī¸Information
  • 🛒Store
  • đŸ’ģDiscord
  • 📚Resources
    • Redutzu MDT
      • Installation
      • Guides
        • Frameworks
        • Items
        • Localization
        • Images
        • Logs
        • Permissions
        • Bodycam
      • Exports/Events
        • Server Events
          • addDispatchToMDT
        • Server Exports
          • Incidents
          • Evidences
          • Warrants
          • Bolos
          • Citizens
          • Vehicles
          • Codes
          • Charges
          • Weapons
          • Announcements
          • Tags
        • Client Events
          • Open/Close MDT
        • Client Exports
      • Common Issues
    • Redutzu EMS
      • Installation
      • Guides
      • Exports
    • Redutzu Documents
      • Installation
      • Guides
      • Exports
Powered by GitBook
On this page
  • Type
  • Exports
  • SearchWarrant
  • CreateWarrant
  • UpdateWarrant
  • DeleteWarrant

Was this helpful?

  1. Resources
  2. Redutzu MDT
  3. Exports/Events
  4. Server Exports

Warrants

Here, you'll find key exports for managing warrants. These exports allow you to create, update, and delete warrants as needed.


Type

type Warrant = {
    id: number,
    reason: string,
    house: string | number, // depends on your housing script
    date: number,
    active: boolean,
    createdAt: string,
    tag?: {
        identifier: string,
        label: string,
        color: string
    },
    players: {
        identifier: string,
        name: string
    }[]
}

Exports

SearchWarrant

exports['redutzu-mdt']:SearchWarrant(id: number) // WarrantType | null

CreateWarrant

exports['redutzu-mdt']:CreateWarrant({
  reason = 'Warrant reason',
  players = { 'license:1234', 'license:4321' }, -- array of identifiers/citizenids
  house = 1, -- depends on your housing script (usually the id)
  tag = 'tag identifier',
  date = 1716935068 -- javascript timestamp (this is the starting date)
}) -- number (id)

UpdateWarrant

-- It returns a boolean (if it was successfully updated)
exports['redutzu-mdt']:UpdateWarrant(id, {
  reason = 'New reason',
  players = { 'license:0000' }
}) -- boolean
local success = exports['redutzu-mdt']:UpdateWarrant(1, {
    reason = 'New reason',
    players = { 'license:0000' }
})

if not success then
    print('There was an error updating the warrant')
    return
end

print('Warrant updated')

DeleteWarrant

-- It returns a boolean (if it was successfully deleted)
exports['redutzu-mdt']:DeleteWarrant(id: number) // boolean
local success = exports['redutzu-mdt']:DeleteWarrant(1)

if not success then
    print('There was an error deleting the warrant')
    return
end

print('Warrant deleted')
PreviousEvidencesNextBolos

Last updated 11 months ago

Was this helpful?

📚