forked from A3Wasteland/ArmA3_Wasteland.Altis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.sqf
74 lines (58 loc) · 2.06 KB
/
init.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
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
// @file Version: 1.2
// @file Name: init.sqf
// @file Author: [404] Deadbeat, [GoT] JoSchaap, AgentRev
// @file Description: The main init.
// @file modification : Shawn le 12/11/2014
#define DEBUG false
enableSaving [false, false];
currMissionDir = compileFinal str call
{
private "_arr";
_arr = toArray str missionConfigFile;
_arr resize (count _arr - 15);
toString _arr
};
X_Server = false;
X_Client = false;
X_JIP = false;
versionName = "fr"; // Set in STR_WL_WelcomeToWasteland in stringtable.xml
if (isServer) then { X_Server = true };
if (!isDedicated) then { X_Client = true };
if (isNull player) then { X_JIP = true };
A3W_scriptThreads = [];
[DEBUG] call compile preprocessFileLineNumbers "globalCompile.sqf";
//init Wasteland Core
[] execVM "config.sqf";
[] execVM "storeConfig.sqf"; // Separated as its now v large
[] execVM "briefing.sqf";
if (!isDedicated) then
{
[] spawn
{
9999 cutText ["Bienvenue sur SFP Wasteland, Patiente ta machine s'initialise !!!", "BLACK", 0.01];
waitUntil {!isNull player};
removeAllWeapons player;
client_initEH = player addEventHandler ["Respawn", { removeAllWeapons (_this select 0) }];
// Reset group & side
[player] joinSilent createGroup playerSide;
player setVariable ["playerSpawning", true, true];
[] execVM "client\init.sqf";
};
};
if (isServer) then
{
diag_log format ["############################# %1 #############################", missionName];
diag_log "SFP WASTELAND SERVEUR - Initialisation du Serveur";
[] execVM "server\init.sqf";
};
//init 3rd Party Scripts
[] execVM "addons\R3F_ARTY_AND_LOG\init.sqf";
[] execVM "addons\proving_ground\init.sqf";
[] execVM "addons\scripts\DynamicWeatherEffects.sqf";
[] execVM "addons\JumpMF\init.sqf";
[] execVM "addons\R3F_AiComTarget\init.sqf";
//musique intro
playSound "Intro";