API

Dispatch App has no exports of its own. It's a thin lb-phone front-end that registers a custom app and cal

What it calls into, client-side (lb-phone registration) and server-side (creating a dispatch).

lua
-- Registers the app with lb-phone once more_dispatch and lb-phone are both "started". Re-runs automatically if lb-phone restarts later.exports["lb-phone"]:AddCustomApp({    identifier = MS.App["identifier"],    name = MS.App["name"],    description = MS.App["description"],    developer = MS.App["developer"],    defaultApp = MS.App["default"],    size = MS.App["size"],    price = MS.App["price"].enabled and MS.App["price"].amount or nil,    images = MS.App["images"],    ui = GetCurrentResourceName() .. "/ui/index.html",    icon = MS.App["icon"],    fixBlur = MS.App["fixBlur"],})

Server-side, an incoming NUI request calls into more_dispatch to actually create the dispatch:

server/main.lua
exports["more_dispatch"]:CreateDispatch({    fraction = fraction,    reason = "Manual Dispatch",    message = message,    coords = GetEntityCoords(GetPlayerPed(source)),    name = MORE.GetPlayerName(source),    gender = MORE.GetCharInfo(source).gender,}, source)

Last updated