DayZ | How To: Custom Day/Time Settings

Use The Code Zombie To Grab A 10% Discount On All DayZ Standalone Servers Here

 

Submit a support ticket and we will help you with this directly.

 

THIS METHOD NO LONGER WORKS

  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

  cappsTimeLoop(setStartHour,setStopHour,true);
  

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)
	{
		GetGame().GetWorld().GetPlayerList(m_Players);
		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));
	     currentPlayer.OnTick();
	     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
			cappsTimeLoop(setStartHour,setStopHour,false);
			//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


Looking for a game server host known for brilliant 24/7 customer support and quality hardware?
Try a Pingperfect DayZ Standalone server today! https://pingperfect.com/gameservers/dayz-standalone-game-server-hosting-rental.php

  • DayZ How To Custom Day/Time Settings, Custom Day/Time Settings, DayZ Custom Day/Time Settings
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

DayZ | Unable to See Server in Game

Use The Code Zombie To Grab A 10% Discount On All DayZ Standalone Servers Here If you are unable...

DayZ | How To: Install & Update Mods (Steam Workshop)

Use The Code Zombie To Grab A 10% Discount On All DayZ Standalone Servers Here In this guide we...

DayZ | How To: Setup Keys (Mods)

Use The Code Zombie To Grab A 10% Discount On All DayZ Standalone Servers Here Some mods require...

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

Use The Code Zombie To Grab A 10% Discount On All DayZ Standalone Servers Here THIS MOD IS NO...

DayZ | Server Announcements

Use The Code Zombie To Grab A 10% Discount On All DayZ Standalone Servers Here   1. Install...