Jump to content
  • 0

Server side Msgs


juandayz

Question

Hello. I solved it.  use if u want to call msgs from server side.

 

calling it from init.sqf in "If isServer" section:

Spoiler

if (isServer) then {
    call compile preprocessFileLineNumbers "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\dynamic_vehicle.sqf";
    _nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf";
    /*ZSC*/
    _serverMonitor =          [] execVM "\z\addons\dayz_server\system\server_monitor.sqf";
    /*ZSC*/
    _side_msg = [] execVM "side_msg.sqf";
};

heres the code.

Spoiler

private ["_mainTextColour","_subTextColour","_hint"];
diag_log(format ["DEBUG RESTART MESSAGE || inizializing || %1",round(time)]);
_subTextColour = "#FFFFFF";
_mainTextColour = "#336699";
 
//////////////////FIRST HOUR SECUENSE//////////////////////////////
 
 
//MSG-1//
waituntil {(round(time)) > 60};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 60) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Los vehiculos abandonados en los Trades seran expulsados</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>en un radio de 200mts</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };

//MSG-2//
waituntil {(round(time)) > 90};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 90) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Los Vendedores Ambulantes Tienen</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>Mejores Precios</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };

//MSG-3//
waituntil {(round(time)) > 180};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 180) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Espacio Aereo Controlado</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>Por el Ejercito de Chernarus</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };

//MSG-4//
waituntil {(round(time)) > 240};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 240) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Patrulla Militar Moviendose</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>Por el NorOeste</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };    

//MSG-5//
waituntil {(round(time)) > 360};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 360) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Una vez Muerto Debes</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>Remover tu Plot</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };    

    //////////////////SECOND HOUR SECUENSE//////////////////////////////
 
 
//MSG-1//
waituntil {(round(time)) > 3600};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 3600) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Los vehiculos abandonados en los Trades seran expulsados</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>en un radio de 200mts</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };

//MSG-2//
waituntil {(round(time)) > 3660};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 3660) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Los Vendedores Ambulantes Tienen</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>Mejores Precios</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };

//MSG-3//
waituntil {(round(time)) > 3690};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 3690) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Espacio Aereo Controlado</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>Por el Ejercito de Chernarus</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };

//MSG-4//
waituntil {(round(time)) > 3750};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 3750) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Patrulla Militar Moviendose</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>Por el NorOeste</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };    

//MSG-5//
waituntil {(round(time)) > 3810};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 3810) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Una vez Muerto Debes</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>Remover tu Plot</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };    

//////////////////THIRD HOUR SECUENSE//////////////////////////////
 
 
//MSG-1//
waituntil {(round(time)) > 7600};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 7600) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Los vehiculos abandonados en los Trades seran expulsados</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>en un radio de 200mts</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };

//MSG-2//
waituntil {(round(time)) > 7660};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 7660) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Los Vendedores Ambulantes Tienen</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>Mejores Precios</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };

//MSG-3//
waituntil {(round(time)) > 7720};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 7720) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Espacio Aereo Controlado</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>Por el Ejercito de Chernarus</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };

//MSG-4//
waituntil {(round(time)) > 7780};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 7780) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Patrulla Militar Moviendose</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>Por el NorOeste</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };    

//MSG-5//
waituntil {(round(time)) > 7840};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 7840) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Una vez Muerto Debes</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>Remover tu Plot</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };                
    
//////////////////QUARTER HOUR SECUENSE//////////////////////////////
 
 
//MSG-1//
waituntil {(round(time)) > 9800};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 9800) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Los vehiculos abandonados en los Trades seran expulsados</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>en un radio de 200mts</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };

//MSG-2//
waituntil {(round(time)) > 9860};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 9860) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Los Vendedores Ambulantes Tienen</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>Mejores Precios</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };

//MSG-3//
waituntil {(round(time)) > 9920};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 9920) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Espacio Aereo Controlado</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>Por el Ejercito de Chernarus</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };

//MSG-4//
waituntil {(round(time)) > 9980};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 9980) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Patrulla Militar Moviendose</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>Por el NorOeste</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };    

//MSG-5//
waituntil {(round(time)) > 10040};
diag_log(format ["DEBUG RESTART MESSAGE || waituntil || %1",round(time)]);
 
    if (time > 10040) then {
          diag_log(format ["DEBUG RESTART MESSAGE||inside if2 no round|| %1",time]);
 
          _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Una vez Muerto Debes</t><br/><t align='center' color='%2'>---------------------------------</t><br/><t color='%3' size='1.0'>Remover tu Plot</t>", _mainTextColour, _subTextColour];
        [nil,nil,rHINT,_hint] call RE;
    };   

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...