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 a code
  • Create a new code
  • Update a code
  • Delete a code

Was this helpful?

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

Codes

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


Type

type Code = {
    id: number,
    name: string,
    description: string,
    code: string,
    createdAt: string
}

Exports

Search for a code

exports['redutzu-mdt']:SearchCode(id: number) // CodeType | null

Create a new code

exports['redutzu-mdt']:CreateCode({
  name = 'Code name',
  description = 'Code description',
  code = '1-101'
}) -- number (id)

Update a code

-- It returns a boolean (if it was successfully updated)
exports['redutzu-mdt']:UpdateCode(id, { name = 'New code name' }) -- boolean

Delete a code

-- It returns a boolean (if it was successfully deleted)
exports['redutzu-mdt']:DeleteCode(id: number) // boolean
PreviousVehiclesNextCharges

Last updated 11 months ago

Was this helpful?

📚