How would I go about adding how much time is left until the server restarts on the debug.
This is my debug for my server. If anyone could help that would be nice.
This is my debug for my server. If anyone could help that would be nice.
Code:
dayz_spaceInterrupt = {
private ["_dikCode", "_handled","_displayg"];
_dikCode = _this select 1;
_handled = false;
if (_dikCode in (actionKeys "GetOver")) then {
if (!r_fracture_legs and (time - dayz_lastCheckBit > 4)) then {
_inBuilding = [player] call fnc_isInsideBuilding;
_nearbyObjects = nearestObjects[getPosATL player, ["TentStorage", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Wire_cat1"], 8];
if (!_inBuilding and (count _nearbyObjects == 0)) then {
dayz_lastCheckBit = time;
call player_CombatRoll;
};
};
};
//if (_dikCode == 57) then {_handled = true}; // space
//if (_dikCode in actionKeys 'MoveForward' or _dikCode in actionKeys 'MoveBack') then {r_interrupt = true};
/*
if (_dikCode == 210) then //insert Key
{
_nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
};
*/
//Prevent exploit of drag body
if ((_dikCode in actionKeys "Prone") and r_drag_sqf) then { force_dropBody = true; };
if ((_dikCode in actionKeys "Crouch") and r_drag_sqf) then { force_dropBody = true; };
if (_dikCode in actionKeys "MoveLeft") then {r_interrupt = true};
if (_dikCode in actionKeys "MoveRight") then {r_interrupt = true};
if (_dikCode in actionKeys "MoveForward") then {r_interrupt = true};
if (_dikCode in actionKeys "MoveBack") then {r_interrupt = true};
if (_dikCode in actionKeys "ForceCommandingMode") then {_handled = true};
if (_dikCode in actionKeys "PushToTalk" and (time - dayz_lastCheckBit > 10)) then {
dayz_lastCheckBit = time;
[player,15,true,(getPosATL player)] spawn player_alertZombies;
};
if (_dikCode in actionKeys "VoiceOverNet" and (time - dayz_lastCheckBit > 10)) then {
dayz_lastCheckBit = time;
[player,15,true,(getPosATL player)] spawn player_alertZombies;
};
if (_dikCode in actionKeys "PushToTalkDirect" and (time - dayz_lastCheckBit > 10)) then {
dayz_lastCheckBit = time;
[player,5,false,(getPosATL player)] spawn player_alertZombies;
};
if (_dikCode in actionKeys "Chat" and (time - dayz_lastCheckBit > 10)) then {
dayz_lastCheckBit = time;
[player,15,false,(getPosATL player)] spawn player_alertZombies;
};
if (_dikCode in actionKeys "User20" and (time - dayz_lastCheckBit > 5)) then {
dayz_lastCheckBit = time;
_nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
};
if ((_dikCode == 0x3E or _dikCode == 0x0F or _dikCode == 0xD3) and (time - dayz_lastCheckBit > 10)) then {
dayz_lastCheckBit = time;
call dayz_forceSave;
};
if (_dikCode == 0xB8 or _dikCode == 0x38 or _dikCode == 0x3E or _dikCode == 0x2A or _dikCode == 0x36 or _dikCode == 0x01) then {
_displayg = findDisplay 106;
if (!isNull _displayg) then {
call player_gearSync;
call dayz_forceSave;
} else {
if (dialog) then {
call player_gearSync;
call dayz_forceSave;
};
};
};
/*
if (_dikCode in actionKeys "IngamePause") then {
waitUntil {
_display = findDisplay 49;
!isNull _display;
};
_btnRespawn = _display displayCtrl 1010;
_btnAbort = _display displayCtrl 104;
_btnRespawn ctrlEnable false;
_btnAbort ctrlEnable false;
};
*/
if (_dikCode == 0x44) then {
if (debugMonitor) then {
debugMonitor = false;
hintSilent "";
} else {[] spawn fnc_debug;};
};
_handled
};
fnc_debug = {
debugMonitor = true;
while {debugMonitor} do
{
_pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
if (player == vehicle player) then
{
_pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture'));
}
else
{
_pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
};
hintSilent parseText format ["
<t color='#4682b4' size='1.15' font='Bitstream' align='center'>[MOOSE]Overwatch</t><br/>
<t color='#ffffff' size='1' font='Bitstream' align='center'>%1</t><br/><br/>
<t size='1' font='Bitstream' align='left'>Zombies Killed: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%2</t><br/>
<t color='#ffffff' size='1' font='Bitstream' align='left'>Survivors Killed: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%4</t><br/>
<t color='#ffffff' size='1' font='Bitstream' align='left'>Bandits Killed: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%5</t><br/>
<t color='#ffffff' size='1' font='Bitstream' align='left'>Blood: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%6</t><br/>
<t color='#ffffff' size='1' font='Bitstream' align='left'>Humanity: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%7</t><br/><br/>
<t color='#ffffff' size='1' font='Bitstream' align='left'>FPS: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%8</t><br/>
<img size='4' image='%9'/><br/>
<t color='#4682b4' size='1' font='Bitstream' align='center'>Press F10 to toggle</t><br/>
<t size='0.7' font='Bitstream' align='center'>Site Coming Soon!</t>",
(name player),
(player getVariable['zombieKills', 0]),
(player getVariable['headShots', 0]),
(player getVariable['humanKills', 0]),
(player getVariable['banditKills', 0]),
(player getVariable['USEC_BloodQty', r_player_blood]),
(player getVariable['humanity', 0]),
(round diag_fps),
_pic];
sleep 1;
};