arma 3 addons init commit

This commit is contained in:
jack77213 2020-02-20 11:13:24 +08:00
parent 9c0907fa35
commit cb033d83bf
Signed by: jack77213
GPG Key ID: CA81AA7BB873B9F1
3 changed files with 53 additions and 0 deletions

1
addons/$PBOPREFIX$ Normal file
View File

@ -0,0 +1 @@
x\huashui\a3web

27
addons/config.cpp Normal file
View File

@ -0,0 +1,27 @@
class CfgPatches
{
class a3web
{
name = "Arma 3 Realtime Map";
author = "jack77213";
url = "https://arma.huashui.cf";
requiredVersion = 1.92;
requiredAddons[] = {"A3_Functions_F"};
units[] = {};
weapons[] = {};
};
};
class CfgFunctions
{
class huashui
{
class a3web
{
file = "x\huashui\a3web";
class a3web { postInit=1; };
};
};
};

25
addons/fn_a3web.sqf Normal file
View File

@ -0,0 +1,25 @@
[] spawn {
//if (!hasInterface) exitWith {};
if (!isServer) exitWith {};
//if (!isDedicated) exitWith {};
addMissionEventHandler ["ExtensionCallback", {
params ["_name", "_function", "_data"];
if (_name isEqualTo "a3web") then
{
diag_log format ["ExtensionCallback %1, %2, %3", _name, _function, _data];
};
}];
waitUntil {time > 0};
a3web_interval = 1;
while {true} do {
sleep a3web_interval;
private _units = allUnits apply {
[netid _x, isPlayer _x, name _x, str (side _x), getPos _x];
};
"liba3web" callExtension ["http:post:/units-info", [_units]];
};
};