-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinitPlayerLocal.sqf
executable file
·186 lines (153 loc) · 3.08 KB
/
initPlayerLocal.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
// Run only on player
if (!hasInterface) exitWith {};
// Wait until player is initialized
waitUntil {!isNull player};
waitUntil{!(isNil "BIS_fnc_init")};
// Initialize configs
_null = execVM "functions\InA\Init\initConfigs.sqf";
// Setup TFAR frequencies
if ("task_force_radio" in activatedAddons) then {
call InA_fnc_TFARsetup;
};
// ACE actions
[player] call InA_fnc_aceActions;
// Conversation structure
call compile preprocessFileLineNumbers "functions\InA\Interact\conversationStructure.sqf";
// Mission description
#include "functions\InA\Init\missionDescription.hpp";
// Ambient
[clientOwner, "ambientSitrep"] remoteExec ["publicVariableClient", 2];
// Initial gear
[player] call InA_fnc_gearWipe;
// Add actions to base
InA_Warning_ID = 0;
menuHQ addAction [
"Headquarters",
{_this call InA_fnc_actionHQMenu;},
[],
99,
true,
true,
"",
"((_target distance _this) < 4)"
];
menuHQ addAction [
"Look at map",
{_this call InA_fnc_actionHQLookAtMap;},
[],
99,
true,
true,
"",
"((_target distance _this) < 4)"
];
GearOpen addAction [
"Gear Requisition",
{_this call InA_fnc_actionGearRequisition;},
[],
99,
true,
true,
"",
"((_target distance _this) < 4)"
];
Garage addAction [
"Vehicle Requisition",
{_this call InA_fnc_actionGarageRequisition;},
[],
99,
true,
true,
"",
"((_target distance _this) < 4)"
];
Hangar addAction [
"Vehicle Requisition",
{_this call InA_fnc_actionHangarRequisition;},
[],
99,
true,
true,
"",
"((_target distance _this) < 4)"
];
Hangar addAction [
"Shelter helicopter",
{["shelter"] call InA_fnc_shelterHelicopter;},
[],
99,
true,
true,
"",
"((_target distance _this) < 4)"
];
Hangar addAction [
"Bring out helicopter",
{["remove"] call InA_fnc_shelterHelicopter;},
[],
99,
true,
true,
"",
"((_target distance _this) < 4)"
];
basicGearBox addAction [
"Equip Uniform",
{_this call InA_fnc_actionUniformEquip;},
[],
99,
true,
true,
"",
"((_target distance _this) < 4)"
];
menuHQ addAction [
"Fast travel",
{_this call InA_fnc_actionTeleport;},
[],
99,
true,
true,
"",
"((_target distance _this) < 4)"
];
// Building Objects
buildObj =
{
{
if (kitVeh in _x) then {
kitVal = _x select 1;
};
} forEach utilityVehicles;
if (kitVal >= objCost) then {
[true, "Building is hidden by default.<br/><br/>Use the SHOW and HIDE commands to toggle the visibility of the structure (keep it hidden if you dont need to see or place it yet, as to avoid accidentally squishing people)", "BUILDING ACTIONS ADDED"] call InA_fnc_formatHint;
obj = objType createVehicle [0,0,0];
xPos = xDefine;
yPos = yDefine;
zPos = zDefine;
aPos = rotDefine;
bPos = 0;
cPos = 0;
transX = 0;
transY = 0;
transZ = 0;
transA = aPos;
transC = cPos;
disableSerialization;
player addAction [
"Building actions",
{
createDialog "InA_Build_Action_Dialog";
},
[],
99,
true,
true,
"",
"",
0
];
} else {
[false, "You do not have the logistical supplies to construct this fortification."] call InA_fnc_formatHint;
};
};