-
Notifications
You must be signed in to change notification settings - Fork 4
/
broadcast.sqf
56 lines (44 loc) · 1.27 KB
/
broadcast.sqf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
ISSE_pub_varCount = _this select 0;
ISSE_pub_varNum = _this select 1;
ISSE_pub_varName = format["ISSE_pub_Pstr_%1", ISSE_pub_varNum];
for [{_i=0}, {_i <= (ISSE_pub_varCount)}, {_i=_i+1}] do
{
_varName = format["ISSE_pub_Pstr_%1", _i];
call compile format['%1 = " ";', _varName];
_varName addPublicVariableEventHandler {call compile (_this select 1);};
};
broadcast = {
if ((TypeName _this) == "STRING") then
{
call compile format['%1 = ''%2'';', ISSE_pub_varName, _this];
publicVariable ISSE_pub_varName;
call compile _this;
} else { hint "Public Error: expecting String."; };
};
toClients = {
if(isDedicated) exitwith {};
if ((TypeName _this) == "STRING") then
{
call compile format['%1 = ''%2'';', ISSE_pub_varName, _this];
publicVariable ISSE_pub_varName;
call compile _this;
} else { hint "Public Error: expecting String."; };
};
broadcast_civ =
{
if(iscop) exitwith {};
if ((TypeName _this) == "STRING") then
{
call compile format['%1 = ''%2'';', ISSE_pub_varName, _this];
publicVariable ISSE_pub_varName;
call compile _this;
}
else
{
hint "Public Error: expecting String.";
};
};
ISSE_pub_execStr =
{
if ((TypeName _this) == "STRING") then {call compile _this;} else {hint "Public Error: expecting String.";};
};