Jump to content
DAYZ-CODE.RU - Создай свой игровой сервер

Restart System with Autokick / Система рестартов с автокиком игроков 1.0.4

   (1 review)

 Share

4 Screenshots

About This File

Description:

A server script that performs automatic server restarts with notifications in the server chat about the time before restarts, server operation time, as well as automatic blocking of the possibility of logging on to the server, kicking players from the server at the time of server blocking, as well as turning off the server.

For a full restart, you just need to turn on the server again (for example, from the batch file you configured or any other program).

 

The game for which this product is suitable: DayZ Standalone

Type: Server script

Authorship: me (123new)


Opportunities:

  • Automatic chat notifications about the time before the restart (can be disabled)
  • Automatic chat notifications about server operation time from the start (can be disabled)
  • Automatic customizable notifications before the server restarts directly for players in the chat. (can be disabled)
  • Automatic blocking of login to the server X minutes before the physical restart of the server (can be disabled)
  • Automatic kick of all players playing on the server from the server X minutes before the physical restart of the server. (can be disabled) Unfortunately, it is not possible to display the reason for the kick on the screen without its client-server mod (a feature of the language of the game). The character is saved at the same time by the regular systems of the game server.
  • Automatic kick (server lock imitation) of all players entering the server if the server is blocked. (can be disabled) Unfortunately, it is not possible to display the reason for the kick on the screen without its client-server mod (a feature of the language of the game).
  • Automatic shutdown of the server at the time of restart with the correct shutdown of the server. (can be disabled)
  • Customizable texts of notifications and alerts in the chat before each action.
  • Two types of restarts with the ability to enable and configure the desired mode: 1) the restart is fixed, at the specified time (analogous to sheduler BEC). 2) the restart is dynamic, after a fixed time from the moment the server is started.
  • Commands accessible from outside to other scripts via code call
     
Get_RestartServer_System()


for execution in their scripts and services. With their help, it is possible to manually lock, unlock the server, kick all players and restart the server.

I recommend for simplicity a program from method 3.

Important:

  • The performance of the script directly depends on the function and execution of the game callLater (delayed launch). If suddenly, after some modification or update of the game, the function is broken or slowed down, the restart may be delayed for some time. At the time of working with patch 1.07, such freezes were found after the server had been running for 5.5 hours without restarting (without mods), no such problems were observed on older versions of the game. For this reason, I do not recommend setting the frequency of restarts above 5 hours!
  • The script was tested on a clean version of the game at the time of publication and is operational to this day and hour.
  • Customization:
  • The script setup consists of several blocks, some of the settings in which depend on each other. I advise you to pay very close attention to filling in the settings!

General Settings:

  • The Name_Block_Log_Script parameter is a label displayed in script.log files at the time of execution of the script commands of this script, including information about server restart and chat dispatches. The format of values is Arbitrary text values! The label will help to ice the execution of the script and correct errors.
  • The enable_work_script parameter enables and disables the operation of the entire script. If false, it will be disabled, and will not do anything in principle at all. The format of the values is true or false
  • The enable_shutdown_server_procedures parameter - enables and disables the functionality of server restarts by script (if false, it is the restart functionality itself that will be disabled, the rest will work)
  • The Enabled_Restarts_In_fixed_time parameter - switching the server restarts mode (true - by fixed time, false - by time from the server start) (the 'enable_shutdown_server_procedures' parameter does not affect this offset) (the time used for kicking players and blocking the server is fixed when 'true', dynamic from the server start when 'false')
  • Next, for the script to work properly, you must configure one of the 2 blocks below! It is to configure, not delete, comment out!!!
  • The operability of the server blocking and player kick functionality depends on them, even if "enable_shutdown_server_procedures = false;"
  • Block 1 - fixed time of server shutdowns:
  • Parameter-array Restarts_Fixed_Time - Fixed time for server restarts (works when Enabled_Restarts_In_fixed_time = true) (if enable_shutdown_server_procedures = false and Enabled_Restarts_In_fixed_time = true, then the functionality of blocking and auto-kicking from the server will depend on this time)
  • Block 2 - Dynamic server shutdown time:
  • The time_format parameter is the time format for dynamic restarts (according to the time from the server start) for the value below. Possible values: seconds, minutes, hours. (works when Enabled_Restarts_In_fixed_time = false)
  • The time_wait_autorestart parameter is the time for a dynamic restart, which the server will count from the moment the server starts. The value is specified in the format by the time_format parameter (for example 3.2) (it is not recommended to set more than 4 hours). The format of the values is a number with a dot. For example, if 3.0 and hours are specified, it means that the restart will be in 3.0 hours. (works when Enabled_Restarts_In_fixed_time = false)

Optional script functionality:

1. Functionality that works only when the enable_shutdown_server_procedures = true option is enabled;

  • The Time_Wait_AfterChatInformation_shutdown_server parameter is specified here for as many seconds before the actual restart there will be auto-information in the server chat. The format of the values is a simple number, without a dot. Time in seconds!
  • The text_ChatInformation_shutdown_server parameter is an auto-information message to the chat before the server restart is performed directly, for the parameter above. Instead of %time%, the time will be automatically substituted by the script. The format of the values is any text.
  • The enable_shutdown_server_chat_RestartInformation_functions parameter is enabling or disabling the notification functionality in the chat before the fast restart at the time specified below. The format of the values is true or false
  • Parameter-array RestartsInformation_chat_minutes - the time for how long each notification will be sent to the chat about the imminent restart of the server. The format of the values is a simple number, without a dot. Time in minutes! Works only when enable_shutdown_server_chat_RestartInformation_functions = true.
  • The text_RestartsInformation_chat parameter is a notification to the chat about the imminent restart of the server. Instead of %time%, the time will be automatically substituted by the script. The format of the values is any text. Works only when enable_shutdown_server_chat_RestartInformation_functions = true.


2. The functionality responsible for background notifications in the chat about the time before the restart and the server's uptime

  • The enable_chat_info_restart_and_uptime parameter - enables or disables informing the chat at regular intervals about the server's operating time and the time remaining before the server restart (true - on, false - off)
  • The text_chat_info_restart_and_uptime parameter is an auto-information notification to the chat. Instead of %time% and %uptime%, the time will be automatically substituted by the script. The format of the values is any text. Works only when enable_chat_info_restart_and_uptime = true.
  • The time_format_chat_info_restart_and_uptime parameter is the format of the time that will be displayed in the message above. It can only have the values: 'seconds', 'minutes', 'hours'. Works only when enable_chat_info_restart_and_uptime = true.
  • The match_time_chat_info_restart_and_uptime parameter - enables or disables rounding the time in the message above to an integer (true - on, false - off). Works only when enable_chat_info_restart_and_uptime = true.
  • The time_chat_information_autorestart parameter is the time between the repetition of sending information to the chat about how long the server is running and how much time is left before the restart.). The value is specified in the format by the time_format_chat_info_restart_and_uptime parameter. The format of the values is a number with a dot.  For example, if 0.10 and hours are specified, then it means every 0.10 hours (an hour is 60 minutes, i.e. the value 1.0 = 1 hour, means 0.10 of 1 hour (10% of 60 minutes) it's 6 minutes).


3. The functionality responsible for blocking the entrance to the server before restarting:

  • The enable_lock_server_in_restart parameter is enabling or disabling the server login lock before restarting (true - on, false - off)
  • The text_lock_server_in_restart parameter is a chat message sent to the chat player when the server login is blocked. The format of the values is any text. Works only when enable_lock_server_in_restart = true.
  • The time_undo_lock_server parameter is the time in minutes before the server closes for restart and stops letting players in (i.e. X minutes before the restart itself). The format of the values is a number with a dot. The time to restart is taken depending on the settings of 1 of the 2 mandatory settings blocks above. Works only when enable_lock_server_in_restart = true.


4. The functionality responsible for kicking all players before restarting the server:

  • The enable_kick_all_from_server_in_restart parameter - enabling-disabling the kick of all players before restarting the server (true - on, false - off)
  • The Time_kick_all_informationWait parameter is the time in seconds, so many seconds before the actual kick from the server there will be auto-information in the chat. The format of the values is a simple number, without a dot. Time in seconds! Works only when enable_kick_all_from_server_in_restart = true.
  • The text_kick_all_from_server_in_restart parameter is an auto-information message to the chat before directly kicking all players from the server, for the parameter above. Instead of %time%, the time will be automatically substituted by the script. The format of the values is any text. Works only when enable_kick_all_from_server_in_restart = true.
  • The time_undo_kick_all_from_server_after_lock parameter is the time in minutes for which the auto-kick of all players from the server will be launched (before the actual server restart). The format of the values is a number with a dot. Works only when enable_kick_all_from_server_in_restart = true.

 

  • Fixed an error in the logic of determining the time to restart in the script when the fixed-time restart functionality is enabled. (for cases when the restart time and the current time almost coincided, only seconds differed)
  • Additional logging was added according to the selected restart mode and restart time in the server logs
  • Added additional time logging, which the script will select at the end of calculations for the future server restart.
  • Added additional time logging for the time remaining before the restart
  • In case of any problems in the operation of the restart script at a fixed prescribed time (functional alternative to BEC), change the following parameter to the value specified below.
     
    bool EnableDebugLogs = true;


    This will help me track the operation of this functionality and find the problem!

    When asking for help, be sure to attach your script.log of the working server at the time with the problem and this option enabled in the script!

 

Edited by nescafe
исправления


Type

Server-mod

Compatible version

1.19

Terms of use

  • It is prohibited to sell/ distribute this product after purchase to any persons who have not purchased this product on its page from the author (current page).
  • It is forbidden to sell / distribute this product by any means, except for buying on its page from the author (the current page), including in case of unfair access to the network.
  • It is prohibited to sell/distribute this product by any means if it has been changed and corrected by the buyer or any other user.
  • It is allowed only to distribute and exchange such goods between persons who purchased this product on its page from the author (the current page), exclusively in personal conversations.
  • It is prohibited to include this product in any foreign modifications without the consent of the seller (author)

Actions after purchase

1. Add the file to your active Mpmissions

2. Enter the first line in init.c
 

#include "$CurrentDir:mpmissions\dayzOffline.chernarusplus\Restart_System.c"

where dayz Offline.chernarusplus is the folder name of your active server mission (the name can be changed to yours, more carefully)


Co - authors

Нет

Communication with the developer

123new

Acceptance of the terms of the trading platform

Yes
  • Like 75
  • Thanks 6
  • Confused 2
  • Go for 1
 Share


Отзывы пользователей

You may only provide a review once you have downloaded the file.


Mattakashi

  

Отличный скрипт и прост в установке,Просто от души за проделанную работу

Link to review
×
×
  • Create New...