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
  • Search for evidence
  • Create new evidence
  • Update evidence
  • Delete evidence

Was this helpful?

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

Evidences

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


Type

type Evidence = {
    id: number,
    name: string,
    description: string,
    vehicles?: string[],
    archive?: number[],
    weapons?: {
        serial: string,
        label: string
    }[],
    images: {
        id: number,
        value: string,
        description: string
    }[],
    players: {
        identifier: string,
        name: string
    }[],
    cops: {
        identifier: string,
        name: string
    }[],
    createdAt: string
}

Exports

Search for evidence

-- It returns the incident data
exports['redutzu-mdt']:SearchEvidence(id)
local evidence = exports['redutzu-mdt']:SearchEvidence(1)
print(evidence.name)

Create new evidence

exports['redutzu-mdt']:CreateEvidence({
  name = 'Evidence name',
  description = 'Evidence description',
  players = { 'license:1234' },  -- array of identifiers/citizenids
  cops = { 'license:1234', 'license:4321' }, -- array of identifiers/citizenids
  vehicles = { 'ABC123' }, -- array of plate numbers
  weapons = { 'serialNumber' }, -- array of serial numbers
  images = { 1, 8 } -- array of gallery image ids
}) -- number (id)

Update evidence

-- It returns a boolean (if it was successfully updated)
exports['redutzu-mdt']:UpdateEvidence(id, {
  name = 'New evidence name',
  players = { 'license:4321' }
}) -- boolean
local success = exports['redutzu-mdt']:UpdateEvidence(1, {
    name = 'Evidence Example',
    players = { 'license:4321' }
})

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

print('Evidence updated')

Delete evidence

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

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

print('Evidence deleted')
PreviousIncidentsNextWarrants

Last updated 11 months ago

Was this helpful?

📚