mirror of
https://github.com/Fallingsheep1985/Arma3Epoch.git
synced 2024-08-30 16:42:12 +00:00
Status Bar
This commit is contained in:
parent
44212fe47f
commit
8ef9ccd51d
Binary file not shown.
44
MPMissions/epoch.Altis/custom/fn_statusBar.sqf
Normal file
44
MPMissions/epoch.Altis/custom/fn_statusBar.sqf
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
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];
|
||||||
|
};
|
||||||
|
};
|
@ -38,6 +38,12 @@ wreckRemovalMaxTime = 360;
|
|||||||
|
|
||||||
class CfgRemoteExecCommands {};
|
class CfgRemoteExecCommands {};
|
||||||
|
|
||||||
|
class RscTitles
|
||||||
|
{
|
||||||
|
|
||||||
|
#include "dialog\statusBar.hpp"
|
||||||
|
};
|
||||||
|
|
||||||
class cfgMusic
|
class cfgMusic
|
||||||
{
|
{
|
||||||
class intro
|
class intro
|
||||||
|
34
MPMissions/epoch.Altis/dialog/statusBar.hpp
Normal file
34
MPMissions/epoch.Altis/dialog/statusBar.hpp
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
#define ST_RIGHT 0x01
|
||||||
|
|
||||||
|
class osefStatusBar {
|
||||||
|
idd = -1;
|
||||||
|
onLoad = "uiNamespace setVariable ['osefStatusBar', _this select 0]";
|
||||||
|
onUnload = "uiNamespace setVariable ['osefStatusBar', objNull]";
|
||||||
|
onDestroy = "uiNamespace setVariable ['osefStatusBar', objNull]";
|
||||||
|
fadein = 0;
|
||||||
|
fadeout = 0;
|
||||||
|
duration = 10e10;
|
||||||
|
movingEnable = 0;
|
||||||
|
controlsBackground[] = {};
|
||||||
|
objects[] = {};
|
||||||
|
class controls {
|
||||||
|
class statusBarText {
|
||||||
|
idc = 1000;
|
||||||
|
x = safezoneX + safezoneW - 1.80;
|
||||||
|
y = safezoneY + safezoneH - 0.04;
|
||||||
|
w = 1.25;
|
||||||
|
h = 0.04;
|
||||||
|
shadow = 1;
|
||||||
|
colorBackground[] = { 1, 0.3, 0, 0.0 };
|
||||||
|
font = "PuristaSemibold";
|
||||||
|
size = 0.03;
|
||||||
|
type = 13;
|
||||||
|
style = 0;
|
||||||
|
text="Loading statusBar...";
|
||||||
|
class Attributes {
|
||||||
|
align="right";
|
||||||
|
color = "#58FA58";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
@ -12,9 +12,26 @@ if (!isDedicated) then {
|
|||||||
VEMFChatMsg = nil;
|
VEMFChatMsg = nil;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//Status Bar
|
||||||
|
[] execVM "custom\fn_statusBar.sqf";
|
||||||
|
|
||||||
// Welcome Credits
|
// Welcome Credits
|
||||||
[] execVM "custom\welcome.sqf";
|
[] execVM "custom\welcome.sqf";
|
||||||
|
|
||||||
//Admin Menu
|
//Admin Menu
|
||||||
execVM "adminmenu\activate.sqf";
|
execVM "adminmenu\activate.sqf";
|
||||||
execVM "adminmenu\loop.sqf";
|
execVM "adminmenu\loop.sqf";
|
||||||
|
|
||||||
|
//BIKE
|
||||||
|
act = player addaction [("<t color=""#0074E8"">" + ("Bike") +"</t>"),"custom\Bike.sqf","",5,false,true,"",""];
|
||||||
|
|
||||||
|
//Loadouts
|
||||||
|
[] execVM "custom\loadout.sqf";
|
||||||
|
|
||||||
|
//Custom LOOT
|
||||||
|
if (isServer) then {
|
||||||
|
fn_getBuildingstospawnLoot = compile preProcessFileLineNumbers "custom\LSpawner\fn_LSgetBuildingstospawnLoot.sqf";
|
||||||
|
LSdeleter = compile preProcessFileLineNumbers "custom\LSpawner\LSdeleter.sqf";
|
||||||
|
execVM "custom\LSpawner\Lootspawner.sqf";
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user