-
Notifications
You must be signed in to change notification settings - Fork 0
/
initServer.sqf
69 lines (62 loc) · 2.21 KB
/
initServer.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
// =================================================================
// SERVER PARAMS
setViewDistance 2000;
{_x disableTIEquipment true;} forEach (allMissionObjects "All");
{_x disableNVGEquipment true;} forEach (allMissionObjects "All");
enableEngineArtillery false;
enableSaving [false,false];
enableRadio false;
enableSentences false;
showSubtitles false;
showHUD [true,true,true,true,true,true,false,true];
// Dynamic Groups for Server
["Initialize", [true]] call ASG_fnc_dynamicGroups;
// Initialize Bank Account Data
seedBalance = 500000;
bankBalance = profileNamespace getVariable ["#ASG_BankBalance",seedBalance];
publicVariable "bankBalance";
// Initialize BaseData
#include "scripts\includes\inc_baseData.hpp"
publicVariable "baseData";
// Base Composition Definitions
#include "scripts\includes\inc_baseComps.hpp"
publicVariable "baseComps";
// Player Spawn Table
#include "scripts\includes\inc_playerSpawnTable.hpp"
publicVariable "playerSpawnTable";
// Base Deployment Follow Terrain
baseFollowTerrain = true;
publicVariable "baseFollowTerrain";
// Get default position of all inventory boxes.
[] call ASG_fnc_getDefaultBoxAnchor;
// Deploy the persistent gear state;
call ASG_fnc_persistDeploy;
// =================================================================
// GRID TRACKER
activeGrids = [];
stdGrid = [];
trackerActive = false; // grid tracking on (true) or off (false);
gridMarkers = false; // map grid colouring on (true) or off (false);
trackedPlayers = ["A11","A12","A13","A21","A22","A23","A31","A32","A33","A4","B11","B12"]; // Players to track.
[] spawn {
_exitWaitUntil = false;
waitUntil {
sleep 1;
if (trackerActive) then {
{
if (isPlayer (missionNamespace getVariable [(_x), objNull])) then {
_stdGridPre = [_x, mapGridPosition (missionNamespace getVariable [(_x), objNull])];
if (_stdGridPre in stdGrid) exitWith {};
stdGrid pushback _stdGridPre;
[([_x] call ASG_fnc_gridTracker)] spawn ASG_fnc_gridResponder;
};
} forEach trackedPlayers;
};
_exitWaitUntil;
};
};
// =================================================================
// LOGISTICS
[] spawn ASG_fnc_logistics;
// Initiates the server save state to profileNamespace every x seconds.
call ASG_fnc_persistSave;