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

Was this helpful?

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

Charges

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


Type

type Charge = {
    id: number,
    name: string,
    description: string,
    jail?: number,
    fine?: number,
    createdAt: string,
    tag: {
        identifier: string,
        label: string,
        color: string
    }
}

Exports

Search for a charge

exports['redutzu-mdt']:SearchCharge(id: number) // ChargeType | null

Create a new charge

exports['redutzu-mdt']:CreateCharge({
  name = 'Charge name',
  description = 'Charge description',
  jail = 5, -- this is optional
  fine = 1000, -- this is optional
  tag = 'tag identifier'
}) -- number (id)

Update a charge

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

Delete a charge

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

Last updated 11 months ago

Was this helpful?

📚