Using Exports
Speeding, shooting, auto theft, melee fights, and player downed are all default alerts that comes with the script.
If you want alerts to on ps-dispatch, you need to manually add each export below to the corresponding script. Usually this is where it calls for the cops on client sided.
exports["ps-dispatch"]:CustomAlert({
coords = vector3(0.0, 0.0, 0.0),
message = "Criminal Activity",
dispatchCode = "10-4 Rubber Ducky",
description = "Blip Name here",
radius = 0,
sprite = 64,
color = 2,
scale = 1.0,
length = 3,
})
Table Arguements:
displayCode -- The code for the alert ( 10-4, 10-11, 400-9, etc)
message -- Alert message
gender -- TRUE/FALSE to enable gender data on the alert
plate -- Plate of a vehicle
priority -- Priority of the alert
firstColor -- Color of the vehicle
automaticGunfire -- TRUE/FALSE Automatic weapon
camId -- Camera ID
callsign -- Callsign on the player
name -- Name of the player
doorCount -- Number of doors the vehicle has
heading -- Heading of an entity
description -- Name of the blip
radius -- if the blip has a radius
recipientList -- { "police", "ems", "pbso" } Jobs that get the alert
blipSprite -- Blip Sprite
blipColour -- Blip Color
blipScale -- Blip Color
blipLength -- Blip Length : How long it stays on the map
offset -- Offset of the blip
blipflash -- If the blip flashes or not
sound -- GTA sound to play
sound2 -- GTA sound to play
- exports['ps-dispatch']:VehicleShooting(vehicle)
- exports['ps-dispatch']:Shooting()
- exports['ps-dispatch']:OfficerDown()
- exports['ps-dispatch']:SpeedingVehicle(vehicle)
- exports['ps-dispatch']:Fight()
- exports['ps-dispatch']:InjuriedPerson()
- exports['ps-dispatch']:StoreRobbery(camId)
- exports['ps-dispatch']:FleecaBankRobbery(camId)
- exports['ps-dispatch']:PaletoBankRobbery(camId)
- exports['ps-dispatch']:PacificBankRobbery(camId)
- exports['ps-dispatch']:PrisonBreak()
- exports['ps-dispatch']:VangelicoRobbery(camId)
- exports['ps-dispatch']:HouseRobbery()
- exports['ps-dispatch']:PrisonBreak()
- exports['ps-dispatch']:DrugSale()
- exports['ps-dispatch']:ArtGalleryRobbery()
- exports['ps-dispatch']:HumaneRobery()
- exports['ps-dispatch']:TrainRobbery()
- exports['ps-dispatch']:VanRobbery()
- exports['ps-dispatch']:UndergroundRobbery()
- exports['ps-dispatch']:DrugBoatRobbery()
- exports['ps-dispatch']:UnionRobbery()
- exports['ps-dispatch']:YachtHeist()
- exports['ps-dispatch']:CarBoosting(vehicle)
- exports['ps-dispatch']:CarJacking(vehicle)
- exports['ps-dispatch']:VehicleTheft(vehicle)
- exports['ps-dispatch']:SuspiciousActivity()
Default Examples
Default qb-bankrobbery
qb-bankrobbery/client/fleeca.lua
Find: Around line 273
TriggerServerEvent("qb-bankrobbery:server:callCops", "small", closestBank, pos)
Replace for:
local camId = Config.SmallBanks[closestBank]["camId"] exports['ps-dispatch']:FleecaBankRobbery(camId)
qb-bankrobbery/client/pacific.lua
Find: Around Line 51 & Line 93
TriggerServerEvent("qb-bankrobbery:server:callCops", "pacific", 0, pos)
Replace for:
local camId = Config.BigBanks["pacific"]["camId"] exports['ps-dispatch']:PacificBankRobbery(camId)
qb-bankrobbery/client/paleto.lua
Find: Around Line 42
TriggerServerEvent("qb-bankrobbery:server:callCops", "paleto", 0, pos)
Replace for:
local camId = Config.BigBanks["paleto"]["camId"] exports['ps-dispatch']:PaletoBankRobbery(camId)
Default qb-storerobbery
qb-storerobbery/client/main.lua
Find: Around Line 90
TriggerServerEvent("qb-storerobbery:server:callCops", "safe", currentSafe, streetLabel, pos)
Replace for:
local cameraId = Config.Safes[currentSafe].camId exports['ps-dispatch']:StoreRobbery(cameraId)
Find for: Line 151 & 168
TriggerServerEvent("qb-storerobbery:server:callCops", "cashier", currentRegister, streetLabel, pos)
Replace for:
local cameraId = Config.Registers[currentRegister].camId exports['ps-dispatch']:StoreRobbery(cameraId)
Default qb-jewelery
qb-jewelery/client/main.lua
Find: Around Line 82
TriggerServerEvent('police:server:policeAlert', 'Robbery in progress')
Replace for:
local camId = '31 | 32 | 33 | 34' exports['ps-dispatch']:VangelicoRobbery(camId)
Find: Around Line 54
TriggerServerEvent('police:server:policeAlert', 'Suspicious Activity')
Replace for:
exports['ps-dispatch']:SuspiciousActivity()
Thanks to NoobySloth for the default examples above.
Last updated