-
Notifications
You must be signed in to change notification settings - Fork 36
/
briefing.sqf
207 lines (144 loc) · 6.58 KB
/
briefing.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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
// F3 - Briefing
// Credits: Please see the F3 online manual (http://www.ferstaberinde.com/f3/en/)
// ====================================================================================
if (!hasInterface) exitWith {}; //Exit if not a player.
// MAKE SURE THE PLAYER INITIALIZES PROPERLY
if (!isDedicated && (isNull player)) then
{
waitUntil {sleep 0.1; !isNull player};
};
// ====================================================================================
// DETECT PLAYER FACTION
// The following code detects what faction the player's slot belongs to, and stores
// it in the private variable _unitfaction
private _unitfaction = toLower (faction player);
// If the unitfaction is different from the group leader's faction, the latters faction is used
if (_unitfaction != toLower (faction (leader group player))) then {_unitfaction = toLower (faction (leader group player))};
// DEBUG
if (f_param_debugMode == 1) then
{
player sideChat format ["DEBUG (briefing.sqf): Player faction: %1",_unitfaction];
};
// ====================================================================================
// BRIEFING: ADMIN
// The following block of code executes only if the player is the current host
// it automatically includes a file which contains the appropriate briefing data.
if (serverCommandAvailable "#kick") then {
#include "f\briefing\f_briefing_admin.sqf"
// DEBUG
if (f_param_debugMode == 1) then
{
player sideChat format ["DEBUG (briefing.sqf): Briefing for host selected.",_unitfaction];
};
};
// ====================================================================================
// BRIEFING: BLUFOR > NATO
// The following block of code executes only if the player is in a NATO or NATO (Pacific) slot; it
// automatically includes a file which contains the appropriate briefing data.
if (_unitfaction in ["blu_f","blu_t_f"]) exitwith {
#include "f\briefing\f_briefing_nato.sqf"
// DEBUG
if (f_param_debugMode == 1) then
{
player sideChat format ["DEBUG (briefing.sqf): Briefing for %1 slot selected.",_unitfaction];
};
};
// ====================================================================================
// BRIEFING: FIA
// The following block of code executes only if the player is in a FIA slot; it
// automatically includes a file which contains the appropriate briefing data.
if (_unitfaction in ["blu_g_f","ind_g_f","opf_g_f"]) exitwith {
#include "f\briefing\f_briefing_fia.sqf"
// DEBUG
if (f_param_debugMode == 1) then
{
player sideChat format ["DEBUG (briefing.sqf): Briefing for %1 slot selected.",_unitfaction];
};
};
// ====================================================================================
// BRIEFING: GENDARMERIE
// The following block of code executes only if the player is in a gendarmerie slot; it
// automatically includes a file which contains the appropriate briefing data.
if (_unitfaction in ["blu_gen_f"]) exitwith {
#include "f\briefing\f_briefing_gendarmerie.sqf"
// DEBUG
if (f_param_debugMode == 1) then
{
player sideChat format ["DEBUG (briefing.sqf): Briefing for %1 slot selected.",_unitfaction];
};
};
// ====================================================================================
// BRIEFING: OPFOR > CSAT
// The following block of code executes only if the player is in a CSAT & CSAT (Pacific) slot; it
// automatically includes a file which contains the appropriate briefing data.
if (_unitfaction in ["opf_f","opf_t_f"]) exitwith {
#include "f\briefing\f_briefing_csat.sqf"
// DEBUG
if (f_param_debugMode == 1) then
{
player sideChat format ["DEBUG (briefing.sqf): Briefing for %1 slot selected.",_unitfaction];
};
};
// ====================================================================================
// BRIEFING: INDEPENDENT > AAF
// The following block of code executes only if the player is in a AAF
// slot; it automatically includes a file which contains the appropriate briefing data.
if (_unitfaction in ["ind_f"]) exitwith {
#include "f\briefing\f_briefing_aaf.sqf"
// DEBUG
if (f_param_debugMode == 1) then
{
player sideChat format ["DEBUG (briefing.sqf): Briefing for %1 slot selected.",_unitfaction];
};
};
// ====================================================================================
// BRIEFING: INDEPENDENT > SYNDIKAT
// The following block of code executes only if the player is in a Syndikat
// slot; it automatically includes a file which contains the appropriate briefing data.
if (_unitfaction in ["ind_c_f"]) exitwith {
#include "f\briefing\f_briefing_syndikat.sqf"
// DEBUG
if (f_param_debugMode == 1) then
{
player sideChat format ["DEBUG (briefing.sqf): Briefing for %1 slot selected.",_unitfaction];
};
};
// ====================================================================================
// BRIEFING: INDEPENDENT > CTRG
// The following block of code executes only if the player is in a Syndikat
// slot; it automatically includes a file which contains the appropriate briefing data.
if (_unitfaction in ["blu_ctrg_f"]) exitwith {
#include "f\briefing\f_briefing_ctrg.sqf"
// DEBUG
if (f_param_debugMode == 1) then
{
player sideChat format ["DEBUG (briefing.sqf): Briefing for %1 slot selected.",_unitfaction];
};
};
// ====================================================================================
// BRIEFING: CIVILIAN
// The following block of code executes only if the player is in a CIVILIAN
// slot; it automatically includes a file which contains the appropriate briefing data.
if (_unitfaction in ["civ_f"]) exitwith {
#include "f\briefing\f_briefing_civ.sqf"
// DEBUG
if (f_param_debugMode == 1) then
{
player sideChat format ["DEBUG (briefing.sqf): Briefing for %1 slot selected.",_unitfaction];
};
};
// ====================================================================================
// BRIEFING: ZEUS
// The following block of code executes only if the player is in a ZEUS (Gamelogic) slot; it automatically includes a file which contains the appropriate briefing data.
if (_unitfaction == "") exitwith {
#include "f\briefing\f_briefing_zeus.sqf"
// DEBUG
if (f_param_debugMode == 1) then
{
player sideChat format ["DEBUG (briefing.sqf): Briefing for %1 slot selected.",_unitfaction];
};
};
// ====================================================================================
// ERROR CHECKING
// If the faction of the unit cannot be defined, the script exits with an error.
player globalchat format ["DEBUG (briefing.sqf): Faction %1 is not defined.",_unitfaction];