Blahman919
New Member
So, me and my friends have been wanting a way to have our sever be 2 hours daytime then 1 hour night before restart. So I decided I would looking into some scripting options and I came up with this:
What do you think? I have no idea if this would work or not and am wanting some thoughts on it. My first attempt at any kind of scripting at all with Arma/DayZ.
Code:
_TimeToNight = 120; //Time in minutes before nighttime
r_DoLoop = true;
_TimeToNight = _TimeToNight * 60; //Set time to seconds
while {r_DoLoop} do {
if (_TimeToNight > 0) then { //Repeat until time is 0
_TimeToNight - 1; //Subtract one second each loop
};
if (_TimeToNight = 0) then {
setDate [2013, 4, 22, 24, 0]; //Set the time to night, the rest doesn't matter much
r_DoLoop = false //End the loop
};
sleep 1;
};
What do you think? I have no idea if this would work or not and am wanting some thoughts on it. My first attempt at any kind of scripting at all with Arma/DayZ.