делай так открываешь файл \mpmissions\dayzOffline.chernarusplus\init.c
в нем прописываешь что бы получилось вот так
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\PlayersMessagesCount.c"
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\InfoMessages.c"
void main()
{
//INIT WEATHER BEFORE ECONOMY INIT------------------------
Weather weather = g_Game.GetWeather();
weather.MissionWeather(false); // false = use weather controller from Weather.c
weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0);
weather.GetRain().Set( 0, 0, 1);
weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0);
GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(SendPlayersCount, TIME_InfoPlayers_Repeat, true);
GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(CustomInformation, TIME_Information_Repeat, true);
далее создаешь тут же \mpmissions\dayzOffline.chernarusplus файлы
PlayersMessagesCount.c ----это сообщение об онлайне.
int TIME_InfoPlayers_Repeat = 120000; //in ms (120 seconds = 120000)
string Message_Chat = "Онлайн: ";
void SendPlayersCount()
{
array<Man> players = new array<Man>;
GetGame().GetPlayers( players );
int numbOfplayers = players.Count();
if( numbOfplayers > 0 )
{
GetGame().ChatPlayer(3,Message_Chat + numbOfplayers.ToString());
}
}
и файл InfoMessages.c ---- это просто информационные соббщения сервера.
int TIME_Information_Repeat = 120000; //in ms (60 seconds = 60000)
ref TStringArray Messages = {"Тут пишите свои сообщения"};
void CustomInformation()
{
//GetGame().GetWorld().GetPlayerList(m_Players);
array<Man> players = new array<Man>;
GetGame().GetPlayers( players );
private int numbOfplayers = players.Count();
if( numbOfplayers > 0 )
{
GetGame().ChatPlayer(3,Messages.GetRandomElement());
}
}