mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-04-17 09:53:21 +03:00
Server Done I Think
This commit is contained in:
25
SQF/dayz_server/system/scheduler/sched_sync.sqf
Normal file
25
SQF/dayz_server/system/scheduler/sched_sync.sqf
Normal file
@@ -0,0 +1,25 @@
|
||||
sched_sync = {
|
||||
private ["_result","_outcome","_date","_hour","_minute"];
|
||||
// EVERY 15 MINUTES
|
||||
// RESYNC TIME WITH HIVE DLL SYSTEM CALL
|
||||
|
||||
_result = "CHILD:307:" call server_hiveReadWrite;
|
||||
_outcome = _result select 0;
|
||||
if(_outcome == "PASS") then {
|
||||
_date = _result select 1;
|
||||
|
||||
_hour = _date select 3;
|
||||
_minute = _date select 4;
|
||||
|
||||
if(dayz_ForcefullmoonNights) then {
|
||||
_date = [2012,8,2,_hour,_minute];
|
||||
};
|
||||
|
||||
setDate _date;
|
||||
dayzSetDate = _date;
|
||||
publicVariable "dayzSetDate";
|
||||
diag_log [ __FILE__, "TIME SYNC: Local Time set to:", _date, "Fullmoon:",dayz_ForcefullmoonNights, "Date given by HiveExt.dll:", _result select 1];
|
||||
};
|
||||
|
||||
objNull
|
||||
};
|
||||
Reference in New Issue
Block a user