mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-14 04:23:30 +00:00
Added register and delete cot functions to handle CoT delete commands
This commit is contained in:
30
addons/main/functions/api/fn_register_cot.sqf
Normal file
30
addons/main/functions/api/fn_register_cot.sqf
Normal file
@@ -0,0 +1,30 @@
|
||||
// function name: armatak_fnc_register_cot
|
||||
// function author: Valmo, Codex
|
||||
// function description: Registers a CoT object under a scope so it can be deleted later.
|
||||
//
|
||||
// Arguments:
|
||||
// 0: Scope/key used to group CoTs <STRING>
|
||||
// 1: CoT UID <STRING>
|
||||
// 2: CoT type <STRING>
|
||||
// 3: Latitude <NUMBER>
|
||||
// 4: Longitude <NUMBER>
|
||||
// 5: HAE altitude <NUMBER>
|
||||
//
|
||||
// Public: Yes
|
||||
|
||||
params [
|
||||
["_scope", "", [""]],
|
||||
["_uid", "", [""]],
|
||||
["_type", "", [""]],
|
||||
["_lat", 0, [0]],
|
||||
["_lon", 0, [0]],
|
||||
["_hae", 0, [0]]
|
||||
];
|
||||
|
||||
if (_scope isEqualTo "" || {_uid isEqualTo ""} || {_type isEqualTo ""}) exitWith {false};
|
||||
|
||||
private _registry = missionNamespace getVariable ["armatak_registered_cots", []];
|
||||
_registry pushBack [_scope, _uid, _type, _lat, _lon, _hae];
|
||||
missionNamespace setVariable ["armatak_registered_cots", _registry];
|
||||
|
||||
true
|
||||
Reference in New Issue
Block a user