blob: c37303660dc4812c0db338cbbcc605af8e83032f (
plain)
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
|
private ["_enable","_exited"];
MenuAction = -1;
while {alive player && dialog} do {
//--- Command AI.
_enable = false;
if (!isNull(commanderTeam)) then {if (commanderTeam == group player) then {_enable = true}};
ctrlEnable [13001,_enable]; //--- Team Orders
ctrlEnable [13004,_enable]; //--- Commander Menu
ctrlEnable [13002,commandInRange]; //--- Special Menu
ctrlEnable [13003,commandInRange]; //--- Upgrade Menu
sleep 0.1;
if (side player != sideJoined) exitWith {closeDialog 0};
if !(dialog) exitWith {};
//--- Command AI.
if (MenuAction == 1) exitWith {
MenuAction = -1;
CloseDialog 0;
CreateDialog "RscOrderMenu";
};
//--- Artillery Menu.
if (MenuAction == 2) exitWith {
MenuAction = -1;
CloseDialog 0;
CreateDialog "RscArtilleryMenu";
};
//--- Upgrade Menu.
if (MenuAction == 3) exitWith {
MenuAction = -1;
CloseDialog 0;
CreateDialog "RscUpgradeMenu";
};
//--- Commander Menu.
if (MenuAction == 4) exitWith {
MenuAction = -1;
CloseDialog 0;
CreateDialog "RscCommanderMenu";
};
//--- Support Menu.
if (MenuAction == 5) exitWith {
MenuAction = -1;
CloseDialog 0;
CreateDialog "RscSupportMenu";
};
};
|