This commit is contained in:
IT07 2016-04-19 16:19:33 +02:00
parent 46682e4f0f
commit 929b64a61f

View File

@ -5,32 +5,25 @@ if (hasInterface) then
// custom addPublicVariableEventHandler. Those bloody BE filters..... // custom addPublicVariableEventHandler. Those bloody BE filters.....
[] spawn [] spawn
{ {
while {true} do _handleMessage =
{ {
waitUntil { uiSleep 0.05; not isNil"VEMFrClientMsg" }; _data = _this;
if (typeName VEMFrClientMsg isEqualTo "ARRAY") then _msg = param [0, "", [[],format[""]]];
{ _mode = param [1, "", [""]];
_data = +[VEMFrClientMsg]; if (_mode isEqualTo "sys") then
VEMFrClientMsg = nil;
_data = _data select 0;
[_data] spawn
{
_data = _this select 0;
_mode = _data param [1, "", [""]];
_msg = _data param [0, "", [[],format[""]]];
switch _mode do
{
case "sys":
{ {
systemChat _msg; systemChat _msg;
}; } else
default
{ {
[_msg select 0, _msg select 1] ExecVM "VEMFr_client\sqf\handleMessage.sqf"; [_msg select 0, _msg select 1] ExecVM "VEMFr_client\sqf\handleMessage.sqf";
}; };
}; };
}; while {true} do
}; {
waitUntil { if isNil"VEMFrClientMsg" then { uiSleep 0.05; false } else { true }};
_data = VEMFrClientMsg;
VEMFrClientMsg = nil;
_data spawn _handleMessage;
}; };
}; };
}; };