Documentation
Search
K
🧬

API

Integrate the Dispatch script with more of your scripts
Calls are used in case of an incident (like robbery). Messages are used for citizens to contact authorities

🤙 CALLS

Use these Exports or Triggers to integrate Calls into your server
EXPORTS (CLIENT-SIDE)
TRIGGERS
exports['core_dispatch']:addCall(code, title, {
{icon=fontawsomeicon, info=information}
}, {x,y,z}, job, cooldown, blipsprite, blipcolor )

EXAMPLE

exports['core_dispatch']:addCall("20-12", "Vehicle is being stolen", {
{icon="fa-ruler", info="4.5 MILES"},
{icon="fa-car", info="RED LAMBORGHINI"}
}, {31.103099822998,6360.7177734375,30.844619}, "police", 3000, 11, 5 )
Use TriggerServerEvent when calling from client-side and TriggerEvent when calling from server-side
TriggerEvent(
"core_dispatch:addCall",
code,
title,
{{icon = fontawsomeicon, info = information}},
{x, y, z},
job,
cooldown,
blipsprite,
blipcolor
)

EXAMPLE

TriggerEvent(
"core_dispatch:addCall",
"10-71",
"Shots in area",
{{icon = "fa-venus-mars", info = "male"}},
{coords[1], coords[2], coords[3]},
"police",
5000,
156,
1
)

✉️ MESSAGES

Use these Exports or Triggers to integrate Messages into your server
EXPORTS (CLIENT-SIDE)
TRIGGERS
exports['core_dispach']:addMessage(message, {x,y,z}, job, cooldown, blipsprite, blipcolor )

EXAMPLE

exports['core_dispach']:addMessage("I need medical help", {31.103099822998,6360.7177734375,30.844619}, "ambulance", 3000, 11, 5 )
Use TriggerServerEvent when calling from client-side and TriggerEvent when calling from server-side
TriggerEvent(
"core_dispatch:addCall",
message,
{x, y, z},
job,
cooldown,
blipsprite,
blipcolor
)

EXAMPLE

TriggerEvent(
"core_dispatch:addMessage",
"Help me i've been robbed!",
{coords[1], coords[2], coords[3]},
"police",
5000,
11,
5
)