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
  • RegisterVehicle
  • SearchVehicle
  • UpdateVehicle

Was this helpful?

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

Vehicles

Here, you'll find key exports for managing vehicles. These exports allow you to register and update vehicles as needed.


Type

type Vehicle = {
    plate: string,
    hash: string, // depends on your framework
    notes?: string,
    image?: string,
    owner: {
       identifier: string,
       name: string
    },
    gallery: {
       id: number,
       value: string,
       description: string
    }[],
    incidents: {
       id: number,
       createdAt: string
    }[],
    bolos: {
       id: number,
       createdAt: string
    }[]
}

Exports

RegisterVehicle

exports['redutzu-mdt']:RegisterVehicle({
  plate = 'ABC1234',
  owner = 'license:1234',
  model = 'hash/model',
  notes = 'Vehicle notes',
  image = 'https://yourwebsite.com/'
}) -- boolean

SearchVehicle

exports['redutzu-mdt']:SearchVehicle(plate: string) // VehicleType | null

UpdateVehicle

-- It returns a boolean (if it was successfully updated)
exports['redutzu-mdt']:UpdateVehicle(plate, {
  image = 'https://yourwebsite.com/'
}) -- boolean
local success = exports['redutzu-mdt']:UpdateVehicle('ABC1234', {
    image = 'https://yourwebsite.com/'
})

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

print('Vehicle updated')
PreviousCitizensNextCodes

Last updated 11 months ago

Was this helpful?

📚