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

Was this helpful?

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

addDispatchToMDT

Server side -- Example code: (Needs your own edits to get coords, street etc.)

    TriggerEvent('redutzu-mdt:server:addDispatchToMDT', {
        code = '10-14',
        title = 'Carjacking',
        street = 'Street name',
        weapon = 'Assault Rifle (AK47)',
        gender = 'Male',
        vehicle = {
            data.name = 'Infernus',
            data.plate = 'ABC123',
            data.doors = 'four door',
            data.color = 'Dark Blue (Metalic)',
            data.class = 'Sports'
        },
        duration = Config.Dispatch.DefaultAlertDuration, -- in miliseconds
        coords = {
            x = 0.0,
            y = 0.0,
            z = 0.0
        }
    })

Client side -- -- Example code: (Needs your own edits to get coords, street etc.)

function onDriveBy(ped)
    local coords = GetEntityCoords(ped)
    local street = GetStreetNameFromCoords(coords)
    local weapon = GetWeaponName()
    local gender = Framework.GetPlayerGender()
    local vehicle = GetVehiclePedIsIn(ped, false)
    local data = GetVehicleInfo(vehicle)

    TriggerServerEvent('redutzu-mdt:server:sendDispatchMessage', {
        code = 'driveby',
        coords = coords,
        street = street,
        weapon = weapon,
        gender = gender,
        vehicle = data
    })
end
PreviousServer EventsNextServer Exports

Last updated 9 months ago

Was this helpful?

📚