le-dispatch
Intallation Guide
Place
le-dispatch
file in yourresources
forderAdd the script to your
server.cfg
Go to the
config.lua
file and setup to your preferencesAdd this client event in your other scripts where you want to create a dispatch and restart your server!
local coords = vector3(-630.95, -230.64, 38.06) -- The position of the dispatch local street, crossingroad = GetStreetNameAtCoord(coords.x, coords.y, coords.z) -- Get the street according to the dispatch position local data = { job = "police", -- The job that will receive the dispatch priority = 2, -- Can be 1, 2, 3, or more if configured in config.lua code = "10-31", -- The dispatch code title = "Jewelry store robbery", -- The dispatch title and the name of the blip on the map message = "", -- The message displayed in the center, can be empty street = GetStreetNameFromHashKey(street), -- The street where the dispatch is located officer = "A.Leroux [25-08]", -- Who/What sends the dispatch, can be anything pos = coords, -- The position of the dispatch in vector3 duration = 10, -- The time the dispatch is displayed on the screen, in seconds source = true, -- If you would like the option to send a message to the person dispatching a call dispatch = '911', -- The response sent when you reply will be: Respond to your [This Variable] call: [Message] blip = { -- Information containing the blip, not mandatory color = 81, -- The color of the blip sprite = 58, -- The sprite of the blip fadeOut = 30, -- The time before the blip is removed from the map area = { -- Information containing the blip zone, not mandatory pos = coords, -- The central position of the zone radius = 100.0, -- The radius of the zone, must be a decimal number color = 1, -- The color of the zone sprite = 9, -- The sprite of the zone, do not change alpha = 50, -- The transparency of the zone time = 60, -- The time the zone is displayed on the map, in seconds }, flash = { -- Information containing the blip flash, not mandatory coord = coords, -- The central position of the flash time = 480, -- The time the flash is displayed on the map, in seconds color = 1, -- The color of the flash scale = 2.0, -- The size of the flash }, } } TriggerServerEvent('le-dispatch:server:newDispatch', data)
Last updated