Advertisement
KRDucky

timesync

Aug 26th, 2015
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. // ******************************************************************************************
  2. // * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
  3. // ******************************************************************************************
  4. // @file Version: 1.0
  5. // @file Name: serverTimeSync.sqf
  6. // @file Author: [404] Deadbeat, AgentRev
  7. // @file Created: 20/11/2012 05:19
  8.  
  9. if (!isServer) exitWith {};
  10.  
  11. _timeMultiDay = ["A3W_timeMultiplierDay", 1] call getPublicVar;
  12. _timeMultiNight = ["A3W_timeMultiplierNight", 1] call getPublicVar;
  13.  
  14. while {true} do
  15. {
  16. currentDate = date;
  17. publicVariable "currentDate";
  18.  
  19. if (daytime >= 20 || daytime < 5) then
  20. {
  21. if (timeMultiplier != _timeMultiNight) then
  22. {
  23. setTimeMultiplier _timeMultiNight;
  24. };
  25. }
  26. else
  27. {
  28. if (timeMultiplier != _timeMultiDay) then
  29. {
  30. setTimeMultiplier _timeMultiDay;
  31. };
  32. };
  33.  
  34. uiSleep 30;
  35. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement