Jump to content
Sign in to follow this  
jdawg132

Custom server time change script [Possible need of help]

Recommended Posts

I'm curious as to whether or not this script will actually change the time of everyone on the server. If not, could you please help me critique it? Tell me what i'm doing wrong? I'm very new to arma2 scripting. To clarify... I'm attempting to change the time of everyone on the server to 5:00.

private["_pList", "j", "i", "_pArray", "v", "_time"];

_pList = playableUnits;
j = count _pList;
i = 0;
_pArray = [];

for "i" from 0 to j do
   {
       v = _pList select i;
	if(player != v) then {
		_time = skipTime 5;
           hint "Douche, the time has been changed to 5:00."
	}

   };

};

Share this post


Link to post
Share on other sites

First thing first,, bumping threads without adding anything to them is not a good thing to do around here. Secondly, this probably belongs to the editing category.

Anyway, i havent really checked what your script would actually, it looks strangely suspicious to me, but you're definitely going overkill here.

Just use this:

skipTime (_timeToSkipTo - daytime + 24 ) % 24

You could use that on the server only

if (isServer) then {
skipTime (_timeToSkipTo - daytime + 24 ) % 24;
};

It will take a few seconds before everybody's skipped to the same time.

A quick search will bring a few things regarding skipping time. There's a FSM somewhere that handles that more properly, i guess.

Edit: Scratch that. Execute skiptime on all clients

Edited by BlackMamb

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  

×