-
Notifications
You must be signed in to change notification settings - Fork 2
/
initServer.sqf
41 lines (36 loc) · 1005 Bytes
/
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
/*
* You can change MissionDate to some specific date to override date set in mission editor:
* a) array in format [YYYY,MM,DD,HH,mm] (e.g. [2012, 12, 31, 12, 45])
* b) date (to use editor set date)
*/
private _date = [
date,
"par_daytime" call BIS_fnc_getParamValue,
["day","night","morning","midday","evening","midnight","random"]
] call dzn_fnc_randomizeTime;
/*
* Date
*/
setDate _date;
MissionDate = date;
publicVariable "MissionDate";
/*
* Weather
*/
if (!isNil "dzn_fnc_setWeather") then {
("par_weather" call BIS_fnc_getParamValue) spawn dzn_fnc_setWeather;
};
/*
* Collect Some Player connection data
*/
PlayerConnectedData = [];
PlayerConnectedEH = addMissionEventHandler ["PlayerConnected", {
diag_log "Client connected";
diag_log _this;
// [ DirectPlayID, getPlayerUID player, name player, @bool, clientOwner ]
PlayerConnectedData pushBack _this;
publicVariable "PlayerConnectedData";
}];
/*
* Mission custom server code goes here:
*/