Exports And Configure
Export Functions And Configurations
Exports All Dispatch List
You can pull and use the entire dispatch list this way. You can use it on both client and server.
local DispatchList = exports["kibra-dispatch"]:DispatchAlerts()
-- The table structure is as follows:
local TableExports = {
[1] = {
address = 'Vinewood',
gender = 'Male',
code = '10-31',
type = 'shooting',
weapon = 'Pistol',
coords = vec3(115.566, 677.155, 30.1),
eventVehicleData = {
vehicleClassName = 'Sports',
vehicleColorName = 'Metal Black',
vehiclePlate = '77FKAA'
},
responders = {"Alex Hirsch", "Kenan Birkan"}, -- Alert Responders
witnesses = 10 -- Witnesses
}
}
Custom Alert
Creating a custom notification is as follows:
-- Client
RegisterCommand('customalert', function()
-- First Parameter: Alert Label
-- Second Parameter: Alert Code Type
-- Third Parameter: Alert Container Icon // You can search on: https://fontawesome.com/icons
-- Receivers Parameter: {"police", ambulance"}
-- Blip Id: https://docs.fivem.net/docs/game-references/blips/
exports["kibra-dispatch"]:SendAlert("Vehicle Theft", "10-60", "fa-vehicle", {"police"}, blipId)
end)
-- Server
RegisterCommand('customalert', function(source)
-- First Parameter: Alert Label
-- Second Parameter: Alert Code Type
-- Third Parameter: Alert Container Icon // You can search on: https://fontawesome.com/icons
-- Receivers Parameter: {"police", ambulance"}
-- Blip Id: https://docs.fivem.net/docs/game-references/blips/
exports["kibra-dispatch"]:SendAlert(source, "Vehicle Theft", "10-60", "fa-vehicle", {"police"}, blipId)
end)
Other Exports
-- House Robbery
-- In the function parameter you must place the coordinate of the house, i.e. the coordinate where the event occurred.
exports["kibra-dispatch"]:HouseRobbery(HouseCoords)
-- Vehicle Theft
-- You need to enter the stripped vehicle in the first parameter of this function.
exports["kibra-dispatch"]:VehicleTheft(Vehicle)
-- Market Robbery
-- You need to integrate the market robbery into your script.
-- Find the event or function where the market robbery was performed and place this code at the bottom of the existing function or in a suitable section.
-- However, you need to enter the coordinate of the robbery location in the parameter of this export function. it must be in vector3 format.
exports["kibra-dispatch"]:ShopRobbery(ShopCoord)
Last updated