mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 15:23:28 +00:00
added intial sqf functions
This commit is contained in:
13
addons/main/CfgFunctions.hpp
Normal file
13
addons/main/CfgFunctions.hpp
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
class CfgFunctions {
|
||||||
|
class armatak {
|
||||||
|
class core {
|
||||||
|
file = "\armatak\armatak\armatak_main\functions\fn_core.sqf";
|
||||||
|
};
|
||||||
|
class init {
|
||||||
|
file = "\armatak\armatak\armatak_main\functions\fn_init.sqf";
|
||||||
|
};
|
||||||
|
class extract_info {
|
||||||
|
file = "\armatak\armatak\armatak_main\functions\fn_extract_info.sqf";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -12,4 +12,5 @@ class CfgPatches {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "CfgCommands.hpp"
|
#include "CfgCommands.hpp"
|
||||||
|
#include "CfgFunctions.hpp"
|
||||||
9
addons/main/functions/fn_core.sqf
Normal file
9
addons/main/functions/fn_core.sqf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// function name: armatak_fnc_map_not_found
|
||||||
|
// function author: Valmo
|
||||||
|
// function description: Main bootstrap function for the mod
|
||||||
|
|
||||||
|
params[];
|
||||||
|
|
||||||
|
if (!isServer) then {
|
||||||
|
return;
|
||||||
|
};
|
||||||
12
addons/main/functions/fn_extract_info.sqf
Normal file
12
addons/main/functions/fn_extract_info.sqf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
params["_unit"];
|
||||||
|
|
||||||
|
// ATAK UTIL INFOS
|
||||||
|
private _atak_uid = getPlayerUID _unit; // ATAK Get Player UID
|
||||||
|
private _atak_callsign = name _unit; // ATAK Display Name
|
||||||
|
private _atak_team_color = "team_color"; // ATAK Team Colors -> White, Yellow, Orange, Magenta, Red, Maroon, Purple, Dark Blue, Blue, Cyan, Teal, Green, Dark Green, Brown || Change it on every squad? make it customizable?
|
||||||
|
private _atak_role = "role"; // ATAK Roles -> Team Member, Team Lead, HQ, Sniper, Medic, Forward Observer, RTO, K9
|
||||||
|
private _atak_display_type = "display_type"; // ATAK Display Types -> Ground Troop, Armored Vehicle, Civilian Vehicle, Generic Air Unit, Generic Ground Unit, Generic Sea Surface Unit
|
||||||
|
private _atak_location = worldName; // ATAK Location in Real World -> Already stored in a database/array
|
||||||
|
private _atak_position = getPos _unit; // ATAK Position -> Converted Arma 3 XYZ Coords to Geographic Coords
|
||||||
|
|
||||||
|
return [_atak_uid, _atak_callsign, _atak_team_color, _atak_role, _atak_display_type, _atak_location, _atak_position];
|
||||||
9
addons/main/functions/fn_init.sqf
Normal file
9
addons/main/functions/fn_init.sqf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// 1. Create FreeTAKServer instance
|
||||||
|
// ....
|
||||||
|
if (!isServer) exitWith {};
|
||||||
|
|
||||||
|
private _armatak_fts_server_url = "armatak" callExtension ["init",[]];
|
||||||
|
|
||||||
|
if (!_armatak_fts_server_url) exitWith {};
|
||||||
|
|
||||||
|
missionNamespace setVariable ["armatak_fts_server_url", _armatak_fts_server_url];
|
||||||
Reference in New Issue
Block a user