mirror of
https://github.com/Fallingsheep1985/Arma3Epoch.git
synced 2024-08-30 16:42:12 +00:00
45 lines
1.5 KiB
Plaintext
45 lines
1.5 KiB
Plaintext
waitUntil {!(isNull (findDisplay 46))};
|
|
disableSerialization;
|
|
/*
|
|
File: fn_statusBar.sqf
|
|
Author: Osef (Ported to EpochMod by piX)
|
|
Edited by: [piX]
|
|
Description: Puts a small bar in the bottom centre of screen to display in-game information
|
|
|
|
PLEASE KEEP CREDITS - THEY ARE DUE TO THOSE WHO PUT IN THE EFFORT!
|
|
|
|
*/
|
|
_rscLayer = "osefStatusBar" call BIS_fnc_rscLayer;
|
|
_rscLayer cutRsc["osefStatusBar","PLAIN"];
|
|
systemChat format["statusBar Loading player info...", _rscLayer];
|
|
|
|
[] spawn {
|
|
sleep 5;
|
|
_counter = 180;
|
|
_timeSinceLastUpdate = 0;
|
|
while {true} do
|
|
{
|
|
sleep 1;
|
|
_counter = _counter - 1;
|
|
_time = (round(180-(serverTime)/60)); //edit the '240' (60*4=240) to change the countdown timer if your server restarts are shorter or longer than 4 hour intervals
|
|
_hours = (floor(_time/60));
|
|
_minutes = (_time - (_hours * 60));
|
|
|
|
switch(_minutes) do
|
|
{
|
|
case 9: {_minutes = "09"};
|
|
case 8: {_minutes = "08"};
|
|
case 7: {_minutes = "07"};
|
|
case 6: {_minutes = "06"};
|
|
case 5: {_minutes = "05"};
|
|
case 4: {_minutes = "04"};
|
|
case 3: {_minutes = "03"};
|
|
case 2: {_minutes = "02"};
|
|
case 1: {_minutes = "01"};
|
|
case 0: {_minutes = "00"};
|
|
};
|
|
|
|
((uiNamespace getVariable "osefStatusBar")displayCtrl 1000)ctrlSetText format["FPS: %1 | PLAYERS: %2 | DAMAGE: %3 | KRYPTO: %4 | HUNGER: %5 | THIRST: %6 | GRIDREF: %7 | RESTART IN: %8:%9", round diag_fps, count playableUnits, damage player, EPOCH_playerCrypto, EPOCH_playerHunger, EPOCH_playerThirst, mapGridPosition player, _hours, _minutes, _counter];
|
|
};
|
|
};
|