Publish
Description
Posts a message to the given channel through DragonflyDB.
Usage
// Arguments:
// 0: STRING - Name of channel to publish to (default: "")
// 1: STRING - Message to publish (default: "")
// Examples:
// Send chat message
private _chatData = ["PlayerName", "Hello everyone!", "Global"];
["chat_channel", str _chatData] call dragonfly_db_fnc_publish; (Server or Singleplayer Only)
// Send SPOTREP
private _spotRepData = [
"Squad", // Size
"Moving", // Activity
[1234, 5678], // Location
"Infantry", // Unit type
"Light Arms" // Equipment
];
["intel_channel", str _spotRepData] call dragonfly_db_fnc_publish; (Server or Singleplayer Only)
// Update vehicle status
private _vehData = [
"VehicleID_123",
0.75, // Fuel
0.2, // Damage
getPosASL _vic // Position
];
["vehicle_status", str _vehData] remoteExecCall ["dragonfly_db_fnc_publish", 2, false]; (Multiplayer Only)
// Mission objective update
private _objData = [
"OBJ_ALPHA",
"COMPLETE",
systemTime
];
["mission_objectives", str _objData] call dragonfly_db_fnc_publish; (Server or Singleplayer Only)