Jump to content
Sign in to follow this  
schmoking

jump back in time on dedicated server?

Recommended Posts

soo.. on my server time runs from 04:40 to 04:55 then skips back, using a loop in init.sqf

i would like to try to change it to run from 04:20 to 04:50 or 05:00 to get the sunrise, then just revert back instantly.

 

sleep (60*5);

skiptime -(1/(60 / 5));

this is the code in the init.sqf.. its something i found for an old arma2 server and i have no clue how it works. i tried changing some numbers around with some weird results.

 

how can i change this to revert back every 30 or 40 minutes instead of 15? and does this sync for all players? it would be important everyone gets the same light conditions.

i also use the same loop to clear fog and set it to ovecast.

 

 

my init.sqf




enableEnvironment false;

if (isServer) then {


[] spawn {

while {true} do {
sleep (60*5);
skiptime -(1/(60 / 5));
0 setovercast 1;
0 setrain 0;
0 setfog 0;
};

};

Share this post


Link to post
Share on other sites

If I have done my calculations correct:

Sleep 2400; //40 Minutes in Seconds.

skipTime -(40/60); //Go back 40 minutes in time

 
According to the Wiki:

 

In Arma 3 (around v1.14) skipTime executed on the server will get synced in 5 seconds or so with all the clients. It will also be JIP compatible. skipTime executed on a client will change time on client for about 5 seconds after which it will sync back to server time.

Share this post


Link to post
Share on other sites

those numbers seem to make some sense to me :)

thanks!!  works perfectly.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×