Add Blip

This endpoint allows you to add a new custom blip to your community's live map!

This API endpoint requires the pro version of Sonoran CAD or higher. For more information, see our pricing page.

This framework export handles the Add Blip API endpoint.

function addBlip(coords, colorHex, subType, toolTip, icon, dataTable, cb) {
    let data = {
        ["serverId"]: GetConvar("sonoran_serverId", 1),
        ["blip"]: {
            ["id"]: -1,
            ["subType"]: subType,
            ["coordinates"]: {
                ["x"]: coords.x,
                ["y"]: coords.y
            },
            ["icon"]: icon,
            ["color"]: colorHex,
            ["tooltip"]: toolTip,
            ["data"]: dataTable
        }
    }
    exports["sonorancad"].performApiRequest(data, "ADD_BLIP", function (res) {
        if (cb !== null) {
            cb(res)
        }
    })
}

Parameters

Last updated