diff --git a/MPMissions/epoch.Altis.pbo b/MPMissions/epoch.Altis.pbo index 3b6e41b..9623b59 100644 Binary files a/MPMissions/epoch.Altis.pbo and b/MPMissions/epoch.Altis.pbo differ diff --git a/MPMissions/epoch.Altis/custom/fn_statusBar.sqf b/MPMissions/epoch.Altis/custom/fn_statusBar.sqf new file mode 100644 index 0000000..cbdb21c --- /dev/null +++ b/MPMissions/epoch.Altis/custom/fn_statusBar.sqf @@ -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]; + }; +}; diff --git a/MPMissions/epoch.Altis/description.ext b/MPMissions/epoch.Altis/description.ext index bef7d27..bdf3fce 100644 --- a/MPMissions/epoch.Altis/description.ext +++ b/MPMissions/epoch.Altis/description.ext @@ -38,6 +38,12 @@ wreckRemovalMaxTime = 360; class CfgRemoteExecCommands {}; +class RscTitles +{ + +#include "dialog\statusBar.hpp" +}; + class cfgMusic { class intro diff --git a/MPMissions/epoch.Altis/dialog/statusBar.hpp b/MPMissions/epoch.Altis/dialog/statusBar.hpp new file mode 100644 index 0000000..ac84b82 --- /dev/null +++ b/MPMissions/epoch.Altis/dialog/statusBar.hpp @@ -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"; + }; + }; + }; +}; \ No newline at end of file diff --git a/MPMissions/epoch.Altis/init.sqf b/MPMissions/epoch.Altis/init.sqf index 838d878..ade4a1c 100644 --- a/MPMissions/epoch.Altis/init.sqf +++ b/MPMissions/epoch.Altis/init.sqf @@ -12,9 +12,26 @@ if (!isDedicated) then { VEMFChatMsg = nil; }; }; + +//Status Bar +[] execVM "custom\fn_statusBar.sqf"; + // Welcome Credits [] execVM "custom\welcome.sqf"; //Admin Menu execVM "adminmenu\activate.sqf"; -execVM "adminmenu\loop.sqf"; \ No newline at end of file +execVM "adminmenu\loop.sqf"; + +//BIKE +act = player addaction [("" + ("Bike") +""),"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"; +}; \ No newline at end of file