Sign in to follow this  
Followers 0
silentfart

day/night cycle

3 posts in this topic

hi guys im fairly new to all this but have some experience i now have a server with gtxgaming ive been trying to get the day night cycle sorted i have tried the methods already posted here they dont seem to work , if theres any one who could help it would be appreciated.

Share this post


Link to post
Share on other sites

something like a 2hrs day and 1hr night going back to day time with a 3hrs server restart??
 use this than ( it will override  the standard exile time):

Name of script = time.sqf

if (!isServer) exitWith {};

//SET DATE
_startingdate = [2039,03,17, 3+floor (random 8), 00]; //2039 = Year, 07 = Month, 3+floor //(random 8) = random time between 3am and 10am, 00 = minite
setdate _startingdate;

//If you dont want a random start time change 3+floor (random 8) to a solid 24 hour time integer, like 10 for 10am

while {true} do
{
    if (daytime >= 19 || daytime < 5) then   // Adjust these for when you want "night time"
    {
        setTimeMultiplier 15      // adjust this value for slower or faster night cycle
    }
    else
    {
        setTimeMultiplier 5      // adjust this value for slower or faster day cycle  
    };

    uiSleep 60;
};

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.