arma 3 addons init commit
This commit is contained in:
parent
9c0907fa35
commit
cb033d83bf
|
@ -0,0 +1 @@
|
||||||
|
x\huashui\a3web
|
|
@ -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; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
@ -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]];
|
||||||
|
};
|
||||||
|
};
|
Loading…
Reference in New Issue