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 weapon
  • Register a new weapon
  • Generate a weapon Serial
  • Update a weapons info

Was this helpful?

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

Weapons

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


Type

type Weapon = {
    name: string,
    label: string, 
    serial: string, 
    notes: string, 
    evidences: {
        id: number,
        createdAt: string
    }[]
}

Exports

Search for a weapon

exports['redutzu-mdt']:SearchWeapon(serial: string) // WeaponType | null

Register a new weapon

local serialNumber = exports['redutzu-mdt']:GenerateWeaponSerial()

exports['redutzu-mdt']:RegisterWeapon({
  label = 'Pistol',
  name = 'weapon_pistol', -- this must be the same as in your GetWeapons function
  serial = serialNumber, -- you can generate your own serial number but it must be unique
  identifier = 'license:1234567890', -- owner identifier (QBCore: citizenid, ESX/Standalone: Identifier)
  notes = 'Weapon notes'
}) -- string (serial number)

Generate a weapon Serial

-- It returns a string
exports['redutzu-mdt']:GenerateWeaponSerial() // string (generates an UNIQUE serial number)

Update a weapons info

-- It returns a boolean (if it was successfully updated)
exports['redutzu-mdt']:UpdateWeapon('serialNumber', { notes = 'Updated notes' }) -- boolean
PreviousChargesNextAnnouncements

Last updated 11 months ago

Was this helpful?

📚