How To: Custom Day/Time Settings

1. Stop your server in your game panel
2. Connect to your server via FTP (Guide here)
3. Navigate to the following directory: /MPmissions/dayzOffline.chernarusplus
4. Download a copy of Capps' Custom DayZ SA Time. You can get a copy of the "Scripts" folder Here
5. Exact the "Scripts" folder into your MPMissions\dayzOffline.chernarusplus directory via FTP
6. Open your Init.c file (MPMissions\dayzOffline.chernarusplus\init.c) by downloading it to your computer via ftp and opening it with notepad (preferably notepad ++)
7. At the top of the Init.c file add the below text above void main()

   #include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\cappsTimeLoop.c"  
   int setStartHour = 10;   
   int setStopHour = 16; 

8. To configure the script you will want to adjust the startHour and stopHour. To get an idea, 0 is 12:00am and 23 is 11:00pm
9. Next add the below text just underneath void main() but above { you will want to add


10. Next scoll down to find override void StartingEquipSetup(PlayerBase player, bool clothesChosen) which is below class CustomMission: MissionServer:
11. Add the following code:

 override void TickScheduler (float timeSplice)
		if( m_Players.Count() == 0 ) return;
		for(int i = 0; i < SCHEDULER_PLAYERS_PER_TICK; i++)
	     if(m_currentPlayer >= m_Players.Count() )
	        m_currentPlayer = 0;
	     PlayerBase currentPlayer = PlayerBase.Cast(m_Players.Get(m_currentPlayer));

		//Ignore above code that is required to keep food,drink and other survival elements working

		int currentTime = GetGame().GetTime() * 0.001;
		static int newTime = 0;
		int timeDelay = 180;
		if (currentTime >= newTime + timeDelay)
			//GetGame().ChatPlayer(1,"3 minute check on reset!");//for debug pruposes
			//GetGame().ChatPlayer(1,"Passed the time switch call");//for debug pruposes
			newTime = currentTime;

12. save the edited init.c file to your pc then upload it to your server via ftp overwriting the one already there (again this goes into MPMissions\dayzOffline.chernarusplus)
13. Start your server in the game panel
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Unable to see server in game.

If you are unable to see your server in game after puchasing make sure the following is true1....

How To: Add Mods (Steam Workshop)

This guide will cover the basics of downloading a mod using our downloader tool and the process...

How To: Setup Keys (Mods)

Some mods require keys in order to allow users to connect. These essentially compare the client...

How To: Install DayZ-Sa-Tomato (Admin Menu)

UPDATED on 27th January 2019.Server Side Setup / Configuration - Part 11. In your game panel, go...

Admin Command List

Commands The following commands are available to you once you have connected to a server: Admin...