Jump to content

[Release] Cen's Custom GUI for Epoch/Overpoch


Defay

Recommended Posts

Thank you very much :) been stressing about this for the last week

Thanks to cen for making it in general, and thanks to Defay for making it extra simple to install <3

Also i would love some help with setting up the Coin system icon like @f3cuk's with the bank under it. 

I just got the files from @f3cuk's so the UPDATE IS COMING SOON!

Link to comment
Share on other sites

thanks all perfect !!!

the only thing it does not work is the icon of fps :mellow:

 it comes commented out from the script you have to go into player_updategui.sqf make a search for "fps" inside the file

//_ctrlFPS = _display displayCtrl 1321;
//_ctrlFPSOuter = _display displayCtrl 1322;
 
//_fps = round diag_FPS;
//_ctrlFPS ctrlSetText str(_fps);
//_ctrlFPS ctrlSetTextColor [0.6, 0.73, 0.0, 0.75];

erase all the "//" from the line begining

Link to comment
Share on other sites

I just added the Plot pole for life to my server, and now its displaying 1000, as every variable on the gui..

The only remote file it uses that is the same is the player_updategui

 

Here is a copy of my current..


 

-- Never mind, im just a idiot and had 2 things point to different areas for the player_updategui lol

 

Its fixed and works perfect, Thank you very much. 

Edited by mootactics
Link to comment
Share on other sites

I decided to sit down and move the GUI to the bottom center of the screen. It's not perfect but I'm only an amateur :lol:

Anyway, posted info below for anyone who fancies using it.

 

Screenshot

https://dl.dropboxusercontent.com/u/7898591/ArmA2OA%202014-09-17%2008-23-00-501.png

 

Code for the ATD_Hud

http://pastebin.com/sr3s4nDc

Don't forget to update the locations for the icons/UI to wherever you have them.

Link to comment
Share on other sites

I decided to sit down and move the GUI to the bottom center of the screen. It's not perfect but I'm only an amateur :lol:

Anyway, posted info below for anyone who fancies using it.

 

Screenshot

https://dl.dropboxusercontent.com/u/7898591/ArmA2OA%202014-09-17%2008-23-00-501.png

 

Code for the ATD_Hud

http://pastebin.com/sr3s4nDc

is cool. more will be coins and bank would do ...)))) will not prompt ( x= ;   y=;)  that they were on a level of the rest of the band

Link to comment
Share on other sites

As the saying goes... "Six of one, half dozen of another"... I'll just keep the code in the description.ext.

I had the same issue , i made some changes so this is the section from my description.ext file was using the RscTitles for the DayZ Group Management, i changed it to this:

 

#include "custom\gui\guidefines.hpp" // <-- Add This for Cen's GUI

class RscTitles
{
#include "custom\gui\ATD_Hud.h" //<--- Add this for Cen's GUI
#include "dzgm\icons.hpp" // belongs to the Dayz Group Management
};

 
created a guidefines.hpp file in the same folder as the ATD_Hud.h file with the following content.
 

#define CT_STATIC 0
#define ST_LEFT           0x00
#define ST_PICTURE        48

 
Changed the ATD_Hud.h  to: (Note: The paths are changed to my directory, use the logic behind it)
 

class playerStatusGUI {
        idd = 6900;
        movingEnable = 0;
        duration = 100000;
        name = "statusBorder";
        onLoad = "uiNamespace setVariable ['DAYZ_GUI_display', _this select 0];";
        class ControlsBackground {
//FOOD BACKGROUND
            class RscPicture_1901: RscPictureGUI
            {
                idc = 1901;
                text = "\z\addons\dayz_code\gui\status\status_bg.paa";
                x = 0.905 * safezoneW + safezoneX;
                y = 0.93 * safezoneH + safezoneY;//2
                w = 0.075;
                h = 0.10;
            };
//FOOD BORDER
            class RscPicture_1201: RscPictureGUI
            {
                idc = 1201;
                text = "\z\addons\dayz_code\gui\status\status_food_border_ca.paa";
                x = 0.905 * safezoneW + safezoneX;
                y = 0.93 * safezoneH + safezoneY;//2
                w = 0.075;
                h = 0.10;
            };
//BLOOD BACKGROUND
            class RscPicture_1900: RscPictureGUI
            {
                idc = 1900;
                text = "\z\addons\dayz_code\gui\status\status_bg.paa";
                x = 0.875 * safezoneW + safezoneX;
                y = 0.93 * safezoneH + safezoneY; //3
                w = 0.075;
                h = 0.10;
            };
//BLOOD BORDER
            class RscPicture_1200: RscPictureGUI
            {
                idc = 1200;
                text = "\z\addons\dayz_code\gui\status\status_blood_border_ca.paa";
                x = 0.875 * safezoneW + safezoneX;
                y = 0.93* safezoneH + safezoneY; //3
                w = 0.075;
                h = 0.10;
            };
//THIRST BACKGROUND
            class RscPicture_1902: RscPictureGUI
            {
                idc = 1902;
                text = "\z\addons\dayz_code\gui\status\status_bg.paa";
                x = 0.935 * safezoneW + safezoneX;
                y = 0.93 * safezoneH + safezoneY; //1
                w = 0.075;
                h = 0.10;
            };
//THIRST BORDER
            class RscPicture_1202: RscPictureGUI
            {
                idc = 1202;
                text = "\z\addons\dayz_code\gui\status\status_thirst_border_ca.paa";
                x = 0.935 * safezoneW + safezoneX;
                y = 0.93 * safezoneH + safezoneY; //1
                w = 0.075;
                h = 0.10;
            };
//TEMP BACKGROUND
            class RscPicture_1908: RscPictureGUI
            {
                idc = 1908;
                text = "\z\addons\dayz_code\gui\status\status_bg.paa";
                x = 0.845 * safezoneW + safezoneX;
                y = 0.93 * safezoneH + safezoneY; //3
                w = 0.075;
                h = 0.10;
            };
//TEMP BORDER
            class RscPicture_1208: RscPictureGUI
            {
                idc = 1208;
                text = "\z\addons\dayz_code\gui\status\status_temp_outside_ca.paa";
                x = 0.845 * safezoneW + safezoneX;
                y = 0.93 * safezoneH + safezoneY; //3
                w = 0.075;
                h = 0.10;
            };
//BROKEN LEG
            class RscPicture_1203: RscPictureGUI
            {
                idc = 1203;
                text = "\z\addons\dayz_code\gui\status\status_effect_brokenleg.paa";
                x = 0.810 * safezoneW + safezoneX;
                y = 0.93 * safezoneH + safezoneY;
                w = 0.075;
                h = 0.10;
                colorText[] = {1,1,1,1};
            };
//NOISE BACKGROUND
            class RscPicture_1205: RscPictureGUI
            {
                idc = 1205;
                text = "\z\addons\dayz_code\gui\status\status_bg.paa";
                x = 0.960 * safezoneW + safezoneX;
                y = 0.825 * safezoneH + safezoneY;
                w = 0.075;
                h = 0.10;
            };
//VISIBLE BACKGROUND
            class RscPicture_1206: RscPictureGUI
            {
                idc = 1206;
                text = "\z\addons\dayz_code\gui\status\status_bg.paa";
                x = 0.960 * safezoneW + safezoneX;
                y = 0.875 * safezoneH + safezoneY;
                w = 0.075;
                h = 0.10;
            };
            /*--------------------------------------------*/
            //SURVIVOR ICON
class RscPicture_1307: RscPictureGUI
            {
                idc = 1307;
                text = "custom\gui\status\st_humanity_survivor.paa";
                x = 0.670 * safezoneW + safezoneX;
                y = 0.933 * safezoneH + safezoneY;
                w = 0.027 * safezoneW;
                h = 0.037 * safezoneH;
                colorText[] = {1,1,1,1};
            };
//BANDIT ICON
            class RscPicture_1309: RscPictureGUI
            {
                idc = 1309;
                text = "custom\gui\status\st_humanity_bandit.paa";
                x = 0.713 * safezoneW + safezoneX;
                y = 0.933 * safezoneH + safezoneY;
                w = 0.027 * safezoneW;
                h = 0.037 * safezoneH;
                colorText[] = {1,1,1,1};
            };
//ZOMBIE ICON
            class RscPicture_1310: RscPictureGUI
            {
                idc = 1310;
                text = "custom\gui\status\zombie.paa";
                x = 0.756 * safezoneW + safezoneX;
                y = 0.933 * safezoneH + safezoneY;
                w = 0.027 * safezoneW;
                h = 0.037 * safezoneH;
                colorText[] = {1,1,1,1};
            };
        };
        class Controls {
//FOOD ICON
            class RscPicture_1301: RscPictureGUI
            {
                idc = 1301;
                //text = "\z\addons\dayz_code\gui\status\status_food_inside_ca.paa";
                x = 0.905 * safezoneW + safezoneX;
                y = 0.93 * safezoneH + safezoneY;
                w = 0.075;
                h = 0.10;
            };
//BLOOD ICON
            class RscPicture_1300: RscPictureGUI
            {
                idc = 1300;
                //text = "\z\addons\dayz_code\gui\status\status_blood_inside_ca.paa";
                x = 0.875 * safezoneW + safezoneX;
                y = 0.93 * safezoneH + safezoneY;
                w = 0.075;
                h = 0.10;
            };
//THIRST ICON
            class RscPicture_1302: RscPictureGUI
            {
                idc = 1302;
                //text = "\z\addons\dayz_code\gui\status\status_thirst_inside_ca.paa";
                x = 0.935 * safezoneW + safezoneX;
                y = 0.93 * safezoneH + safezoneY;
                w = 0.075;
                h = 0.10;
            };
//TEMP ICON
            class RscPicture_1306: RscPictureGUI
            {
                idc = 1306;
                //text = "\z\addons\dayz_code\gui\status\status_temp_ca.paa";
                x = 0.845 * safezoneW + safezoneX;
                y = 0.93 * safezoneH + safezoneY;
                w = 0.075;
                h = 0.10;
            };
//BLOOD ICON - BLEEDING
            class RscPicture_1303: RscPictureGUI
            {
                idc = 1303;
                text = "\z\addons\dayz_code\gui\status\status_bleeding_ca.paa";
                x = 0.875 * safezoneW + safezoneX;
                y = 0.93 * safezoneH + safezoneY;
                w = 0.075;
                h = 0.10;
                colorText[] = {1,1,1,0.5};
            };
//NOISE ICON
            class RscPicture_1304: RscPictureGUI
            {
                idc = 1304;
                text = "\z\addons\dayz_code\gui\status\status_noise.paa";
                x = 0.960 * safezoneW + safezoneX;
                y = 0.825 * safezoneH + safezoneY;
                w = 0.075;
                h = 0.10;
            };
//VISIBLE ICON
            class RscPicture_1305: RscPictureGUI
            {
                idc = 1305;
                text = "\z\addons\dayz_code\gui\status\status_visible.paa";
                x = 0.960 * safezoneW + safezoneX;
                y = 0.875 * safezoneH + safezoneY;
                w = 0.075;
                h = 0.10;
            };
//FPS
            class RscText_1321: RscTextGUIK
            {
                idc = 1321;
                text = "fps";
                x = 0.960 * safezoneW + safezoneX;
                y = 0.93 * safezoneH + safezoneY;
                w = 0.037 * safezoneW;
                h = 0.047 * safezoneH;
                size = 0.065;
                sizeEx = 0.065;
                colorText[] = {1,1,1,0.0};
            };
//FPS BACKGROUND
            class RscText_1322: RscPictureGUI
            {
                idc = 1322;
                //text = "\z\addons\dayz_code\gui\status\status_bg.paa";
                x = 0.960 * safezoneW + safezoneX;
                y = 0.93 * safezoneH + safezoneY;
                w = 0.037 * safezoneW;
                h = 0.047 * safezoneH;
                colorText[] = {1,1,1,0.0};
            };
            /*-----------------------------------------------*/
            //SURVIVOR KILLS
class RscText_1400: RscTextGUIK
            {
                idc = 1400;
                text = "1000";
                x = 0.683 * safezoneW + safezoneX;
                y = 0.931 * safezoneH + safezoneY;
                w = 0.037 * safezoneW;
                h = 0.047 * safezoneH;
                colorText[] = {1,1,1,1.0};
                size = 0.03;
                sizeEx = 0.03;
            };
//BANDIT KILLS
            class RscText_1402: RscTextGUIK
            {
                idc = 1402;
                text = "1000";
                x = 0.726 * safezoneW + safezoneX;
                y = 0.931 * safezoneH + safezoneY;
                w = 0.037 * safezoneW;
                h = 0.047 * safezoneH;
                colorText[] = {1,1,1,1.0};
                size = 0.03;
                sizeEx = 0.03;
            };
//ZOMBIE KILLS
            class RscText_1403: RscTextGUIK
            {
                idc = 1403;
                text = "1000";
                x = 0.769 * safezoneW + safezoneX;
                y = 0.931 * safezoneH + safezoneY;
                w = 0.037 * safezoneW;
                h = 0.047 * safezoneH;
                colorText[] = {1,1,1,1.0};
                size = 0.03;
                sizeEx = 0.03;
            };
//BLOOD AMOUNT
class RscText_1420: RscTextGUIK
            {
                idc = 1420;
                text = "1000";
                x = 0.915 * safezoneW + safezoneX;
                y = 0.842 * safezoneH + safezoneY;
                w = 0.040 * safezoneW;
                h = 0.047 * safezoneH;
                colorText[] = {0.8,0.07,0.06,1.0};
                size = 0.03;
                sizeEx = 0.03;
            };
//HUMANITY AMOUNT
class RscText_1421: RscTextGUIK
            {
                idc = 1421;
                text = "1000";
                x = 0.915 * safezoneW + safezoneX;
                y = 0.862 * safezoneH + safezoneY;
                w = 0.040 * safezoneW;
                h = 0.047 * safezoneH;
                colorText[] = {1,1,1,1.0};
                size = 0.03;
                sizeEx = 0.03;
            };
//SERVER RESTART AMOUNT
class RscText_1422: RscTextGUIK
            {
                idc = 1422;
                text = "1000";
                x = 0.915 * safezoneW + safezoneX;
                y = 0.882 * safezoneH + safezoneY;
                w = 0.040 * safezoneW;
                h = 0.047 * safezoneH;
                colorText[] = {1,0.8,0,1.0};
                size = 0.03;
                sizeEx = 0.03;
            };
//BLOOD LABEL
class RscText_1423: RscTextGUIK
            {
                idc = 1423;
                text = "Blood Left:";
                x = 0.845 * safezoneW + safezoneX;
                y = 0.842 * safezoneH + safezoneY;
                w = 0.08 * safezoneW;
                h = 0.047 * safezoneH;
                colorText[] = {1,1,1,1.0};
                size = 0.03;
                sizeEx = 0.03;
            };
//HUMANITY LABEL
class RscText_1424: RscTextGUIK
            {
                idc = 1424;
                text = "Humanity:";
                x = 0.845 * safezoneW + safezoneX;
                y = 0.862 * safezoneH + safezoneY;
                w = 0.08 * safezoneW;
                h = 0.047 * safezoneH;
                colorText[] = {1,1,1,1.0};
                size = 0.03;
                sizeEx = 0.03;
            };
//RESTART LABEL
class RscText_1425: RscTextGUIK
            {
                idc = 1425;
                text = "Restart in (min):";
                x = 0.845 * safezoneW + safezoneX;
                y = 0.882 * safezoneH + safezoneY;
                w = 0.08 * safezoneW;
                h = 0.047 * safezoneH;
                colorText[] = {1,1,1,1.0};
                size = 0.03;
                sizeEx = 0.03;
            };
        };
    };
 

 
This way we can keep the description.ext file cleaner :)
Also added the info about players online and currently working in adding days alive, i can share those if people are interested.
 
Thanks to Cen for making this great GUI and Defay for sharing it with us!
 

 

Link to comment
Share on other sites

Hey guys,

so I saw that there are lot of people asking how to get an GUI looking like this:

 

bfKLcQE.png

 

This is not my work, I'm only posting a tutorial on how to do it. This is from user Cen who was so nice to share it with us.

All credits go to: Cen

 

Tutorial:

 

1.) First download these files and extract them in the root of your mission folder or mission.pbo.

Download Link or Attached files.

 

2.) Add this to the bottom of description.ext

class RscPictureGUI
{
    access = 0;
    type = 0;
    idc = -1;
    colorBackground[] = {0,0,0,0};
    colorText[] = {0.38,0.63,0.26,0.75};
    font = "TahomaB";
    sizeEx = 0;
    lineSpacing = 0;
    text = "";
    style = "0x30 + 0x100";
    x = 0;
    y = 0;
    w = 0.2;
    h = 0.15;
};
class RscTextGUIK {
    type = 0;
    idc = -1;
    style = 0x02;
    colorBackground[] = {0,0,0,0};
    colorText[] = {1, 1, 1, 0.5};
    //color[] = {1, 1, 1, 0.5};
    font = "TahomaB";
    size = 0.03;
    sizeEx = 0.03;
    x = 0;
    y = 0;
    w = 0.1;
    h = 0.2;
};

#include "dayz_code\gui\ATD_Hud.h"

3.) Add this line to a custom compiles.sqf or overwrite the path in the existing compiles.sqf (depends how you call yours).

I will not do a tutorial on how to add custom compiles as there are plenty of them already out here on this forum.

player_updateGui  = 	compile preprocessFileLineNumbers "dayz_code\compile\player_updateGui.sqf";

4.) Edit ATD_Hud.h to your liking.

 

And that should be it! If you have any questions or problems with it, please post down below and I'll try to get back to you as soon as possible or send me a PM.

Let me know how I did for my first tutorial and thanks again to Cen for the HUD and letting me post a tutorial on this.

 

Defay, you are my hero! Thanks for putting that stuff together :D

 

edit: works like a charm btw ;)

 

Edit2:

Can you point me where i can change the "Restart in (min):"-Label that way it shows the temperature instead (using namalsk and just running the server when my friends and i are playing)?

 

Got it:

Changed classes 1422 and 1425 (1425 is the label text) in description.ext.

in player_updateGui.sqf: changed all "_ctrlServerRestart" in "_ctrlTemperature" and all "_RestartTime" in "_PlayerTemperature_Amount" ( change it's value at line ~43 to "round(dayz_temperatur)" - without the " )

-> It goes now from 42 (max) to 27 (min)

Now i only got the problem that the cold isn't doing anything - but thats about another mod i think... - that random chance... it's working, just got "lucky" when testing ^^

 

greetz ^^

Link to comment
Share on other sites

  • 3 weeks later...

I just added the Plot pole for life to my server, and now its displaying 1000, as every variable on the gui..

The only remote file it uses that is the same is the player_updategui

 

Here is a copy of my current..


 

-- Never mind, im just a idiot and had 2 things point to different areas for the player_updategui lol

 

Its fixed and works perfect, Thank you very much. 

 

 

Im having the same issue .. everything is 1000 ,  . I have  player_updategui file locations .. Plot for Life,  and this ..do I just point the plot for life to this one, or vice versa ? 

Link to comment
Share on other sites

Im having the same issue .. everything is 1000 ,  . I have  player_updategui file locations .. Plot for Life,  and this ..do I just point the plot for life to this one, or vice versa ? 

 

u take all the program knownledge u can get, open both files and make them into 1 file ( updategui isn't the hardest one). GL M8, 2 min works, u can do it ^^

Link to comment
Share on other sites

u take all the program knownledge u can get, open both files and make them into 1 file ( updategui isn't the hardest one). GL M8, 2 min works, u can do it ^^

 

Look Zuppa you don't have to be an ass .. not everyone is a programer ... but I'm learning ,,  but I can use spell check lol  :o   B)  just a straight answer goes a long way 

Link to comment
Share on other sites

Look Zuppa you don't have to be an ass .. not everyone is a programer ... but I'm learning ,,  but I can use spell check lol  :o   B)  just a straight answer goes a long way 

 

That wasn't actually being an ass. 

 

If u want it , u can do it, because it's easy to do, u dont even need programming knownledge to do so. 

 

I encourage the attempts to do it first yourself.

 

You got to understand that we help people ALOT, and we mostly get nothing in return for it except for a thx, which is nice. But it's nicer if the person first tries to do it ^^

 

And i dont really see spelling mistakes in my sentence u quoted ? ^^

Link to comment
Share on other sites

I do work IT , and send out info to less that knowledgeable peoples all the time.. how to do this and that .. so I fully understand what your talking about ,, I do try first .. but messing shit up worse due to lack of documentation is bad too lol

In either case .. I have tried multiple ways . still has 1000 on everything .. one thing I do have is a debug monitor already noxsicarius/Custom-Debug-Monitor

.. that debug shows all the correct data , this one does not. I would assume they are conflicting ??

Link to comment
Share on other sites

so ive managed to show coins and bank with this HUD, but they are being displayed ex. 1111 , 111111, which makes confusing kind of

now im trying to make bank and coins being displayed with this format  1,111 or 111,111 but havent got nowhere with this

 

could anyone explain how can this be done ?

 

i saw f3cuk managed to do that, if you happen to come by my post and mind sendig me those files so i can figure it out the logic on this...

Link to comment
Share on other sites

Im doing a fresh install .. after another mod trashed my stuff .. tried backing out .. but just never could get back online today .. just got back on with vanilla epoch , after trying all day to resolve .. what was going to be I thought simple .. ended up be a cluster , since I like yours better Im going to install it first .. and ghost image , then the next mod etc lol .. this sucked today .. people all day messaging me .. whats up when you gonna be back on line lol .. didn't realize I had become popular lol

Link to comment
Share on other sites

Here guys

P4L

player_updategui.sqf

all working on here with gold coin

(No sarky)

private ["_display","_ctrlBlood","_ctrlBleed","_bloodVal","_humanityName","_ctrlFood","_ctrlThirst","_thirstVal","_foodVal","_ctrlTemp","_tempVal","_combatVal","_array","_ctrlEar","_ctrlEye","_ctrlCombat","_ctrlFracture","_visualText","_visual","_audibleText","_audible","_blood","_thirstLvl","_foodLvl","_tempImg","_thirst","_food","_temp","_bloodLvl","_tempLvl","_color","_string","_humanity",
"_size","_friendlies","_rfriendlies","_rfriendlyTo","_distance","_targetControl","_playerUID","_rplayerUID","_humanityTarget","_ctrlBloodOuter","_ctrlFoodBorder","_ctrlThirstBorder","_ctrlTempBorder"];
disableSerialization;

_foodVal =         1 - (dayz_hunger / SleepFood);
_thirstVal =     1 - (dayz_thirst / SleepWater);
_tempVal     =     1 - ((dayz_temperatur - dayz_temperaturmin)/(dayz_temperaturmax - dayz_temperaturmin));    // Normalise to [0,1]
_combatVal =    1 - dayz_combat; // May change later to be a range of red/green to loosely indicate 'time left in combat'

if (uiNamespace getVariable ["DZ_displayUI", 0] == 1) exitWith {
    _array = [_foodVal,_thirstVal];
    _array
};

_display = uiNamespace getVariable 'DAYZ_GUI_display';
//=======CEN=============
_ctrlBloodOuter = _display displayCtrl 1200;
_ctrlFoodBorder = _display displayCtrl 1201;
_ctrlThirstBorder = _display displayCtrl 1202;
_ctrlTempBorder = _display displayCtrl 1208;
//Border white
_ctrlBloodOuter ctrlSetTextColor [1,1,1,1];
_ctrlFoodBorder ctrlSetTextColor [1,1,1,1];
_ctrlThirstBorder ctrlSetTextColor [1,1,1,1];
_ctrlTempBorder ctrlSetTextColor [1,1,1,1];

_ctrlBlood =     _display displayCtrl 1300;
_ctrlBleed =     _display displayCtrl 1303;
_bloodVal =        r_player_blood / r_player_bloodTotal;
_ctrlFood =     _display displayCtrl 1301;
_ctrlThirst =     _display displayCtrl 1302;
_ctrlTemp     =     _display displayCtrl 1306;                    //TeeChange
_ctrlEar =         _display displayCtrl 1304;
_ctrlEye =         _display displayCtrl 1305;
_ctrlHumanity = _display displayCtrl 1207;
_ctrlCombat = _display displayCtrl 1307;
_ctrlFracture =     _display displayCtrl 1203;

_ctrlBloodAmount = _display displayCtrl 1420;
_ctrlHumanityAmount = _display displayCtrl 1421;
_ctrlServerRestart = _display displayCtrl 1422;

_bloodTotal = r_player_blood;
_RestartTime = 360-(round(serverTime/60));

_ctrlBloodAmount      ctrlSetText str(_bloodTotal);
_ctrlHumanityAmount ctrlSetText str(player getVariable['humanity', 0]);
_ctrlServerRestart  ctrlSetText str(_RestartTime);

_ctrlFPS = _display displayCtrl 1321;
_ctrlFPSOuter = _display displayCtrl 1322;

_fps = round diag_FPS;
_ctrlFPS ctrlSetText str(_fps);
_ctrlFPS ctrlSetTextColor [0.6, 0.73, 0.0, 0.75];

_ctrlhumanKills = _display displayCtrl 1400;
_ctrlhHeadshots = _display displayCtrl 1401;
_ctrlbanditKills= _display displayCtrl 1402;
_ctrlzombieKills= _display displayCtrl 1403;

_ctrlhumanKills  ctrlSetText str(player getVariable["humanKills", 0]);
_ctrlbanditKills ctrlSetText str(player getVariable["banditKills", 0]);
_ctrlzombieKills ctrlSetText str(player getVariable["zombieKills", 0]);
_ctrlhHeadshots  ctrlSetText str(player getVariable["headShots", 0]);
//=======CEN=============
//Food/Water/Blood
_ctrlBlood ctrlSetTextColor     [(Dayz_GUI_R + (0.3 * (1-_bloodVal))),(Dayz_GUI_G * _bloodVal),(Dayz_GUI_B * _bloodVal), 0.5];
_ctrlFood ctrlSetTextColor         [(Dayz_GUI_R + (0.3 * (1-_foodVal))),(Dayz_GUI_G * _foodVal),(Dayz_GUI_B * _foodVal), 0.5];
_ctrlThirst ctrlSetTextColor     [(Dayz_GUI_R + (0.3 * (1-_thirstVal))),(Dayz_GUI_G * _thirstVal),(Dayz_GUI_B * _thirstVal), 0.5];
_ctrlTemp ctrlSetTextColor         [(Dayz_GUI_R + (0.3 * (1-_tempVal))), (Dayz_GUI_G * _tempVal), _tempVal, 0.5];    // Color ranges from iceblue (cold) to red (hot)
_ctrlCombat ctrlSetTextColor        [(Dayz_GUI_R + (0.3 * (1-_combatVal))),(Dayz_GUI_G * _combatVal),(Dayz_GUI_B * _combatVal), 0.5];

_blood = "";
_thirst = "";
_food = "";
_temp = "";
_tempImg = 0;
_bloodLvl = round((r_player_blood / 2) / 1000);
_thirstLvl = round(_thirstVal / 0.25);
_foodLvl = round(_foodVal / 0.25);
_tempLvl = round(dayz_temperatur);

if (_bloodLvl <= 0) then {
    _blood = "\z\addons\dayz_code\gui\status_blood_inside_1_ca.paa";
    } else {
    _blood = "\z\addons\dayz_code\gui\status_blood_inside_" + str(_bloodLvl) + "_ca.paa";
    };

if (_thirstLvl < 0) then { _thirstLvl = 0 };
_thirst = "\z\addons\dayz_code\gui\status_thirst_inside_" + str(_thirstLvl) + "_ca.paa";

if (_foodLvl < 0) then { _foodLvl = 0 };
_food = "\z\addons\dayz_code\gui\status_food_inside_" + str(_foodLvl) + "_ca.paa";

if ( _tempLvl >= 36 )                            then { _tempImg = 4 };
if ( _tempLvl > 33 && _tempLvl < 36 )            then { _tempImg = 3 };
if ( _tempLvl >= 30 && _tempLvl <= 33 )        then { _tempImg = 2 };
if ( _tempLvl > 28 && _tempLvl < 30 )            then { _tempImg = 1 };
if ( _tempLvl <= 28 )                            then { _tempImg = 0 };

_temp = "\z\addons\dayz_code\gui\status_temp_" + str(_tempImg) + "_ca.paa";

_ctrlBlood ctrlSetText _blood;
_ctrlThirst ctrlSetText _thirst;
_ctrlFood ctrlSetText _food;
_ctrlTemp ctrlSetText _temp;

/*
    Visual:
*/
_visual = (dayz_disVisual / 185) min 1;
if (_visual < 0.2) then {_visual = 0.2;};
_ctrlEye  ctrlSetTextColor [1, 1, 1, _visual];

/*
    Audible:
*/
_audible = (dayz_disAudial / 40) min 1;
if (_audible < 0.2) then {_audible = 0.2;};
_ctrlEar ctrlSetTextColor [1, 1, 1, _audible];

/*
    Fracture:
*/
if (!canStand player) then {
    if (!(ctrlShown _ctrlFracture)) then {
        r_fracture_legs = true;
        _ctrlFracture ctrlShow true;
    };
};

/*
    Flashing:
*/
if (_combatVal == 0) then {
    _ctrlCombat call player_guiControlFlash;
};

if (_bloodVal < 0.2) then {
    _ctrlBlood call player_guiControlFlash;
};

if (_thirstVal < 0.2) then {
    _ctrlThirst call player_guiControlFlash;
};

if (_foodVal < 0.2) then {
    _ctrlFood call player_guiControlFlash;
};

if (_tempVal > 0.8) then {    //TeeChange
    _ctrlTemp call player_guiControlFlash;
} else {
    _ctrlTemp ctrlShow true;
};

if (r_player_injured) then {
    _ctrlBleed call player_guiControlFlash;
};

/*
Opt-in tag system with friend tagging
*/
_string = "";
_humanityTarget = cursorTarget;
if (!isNull _humanityTarget && isPlayer _humanityTarget && alive _humanityTarget) then {

    _distance = player distance _humanityTarget;

    if (_distance < DZE_HumanityTargetDistance) then {
        
        _size = (1-(floor(_distance/5)*0.1)) max 0.1;

        // Display name if player opt-in || if friend
        _friendlies = player getVariable ["friendlies", []];
        _playerUID = getPlayerUID player;
        _rplayerUID = getPlayerUID _humanityTarget;
        _rfriendlies = _humanityTarget getVariable ["friendlies", []];
        _rfriendlyTo = _humanityTarget getVariable ["friendlyTo", []];

        if ((_rplayerUID in _friendlies) && (_playerUID in _rfriendlies)) then {

            if !(_playerUID in _rfriendlyTo) then {
                // diag_log format["IS FRIENDLY: %1", _player];
                _rfriendlyTo set [count _rfriendlyTo, _playerUID];
                _humanityTarget setVariable ["friendlyTo", _rfriendlyTo, true];
            };
    
            // <br /><t %2 align='center' size='0.7'>Humanity: %3</t>

            _color = "color='#339933'";
            _string = format["<t %2 align='center' size='%3'>%1</t>",(name _humanityTarget),_color,_size];
        
        } else {

            // Humanity checks
            _humanity = _humanityTarget getVariable ["humanity",0];

            _color = "color='#ffffff'";
            if(_humanity < -5000) then {
                _color = "color='#ff0000'";
            } else {
                if(_humanity > 5000) then {
                    _color = "color='#3333ff'";
                };
            };
            if((_humanityTarget getVariable ["DZE_display_name", false]) || (DZE_ForceNameTagsInTrader && isInTraderCity)) then {
                _string = format["<t %2 align='center' size='%3'>%1</t>",(name _humanityTarget),_color,_size];
            };
        };
    };
};

// update gui if changed
if (dayz_humanitytarget != _string) then {
    _targetControl = _display displayCtrl 1199;
    _targetControl ctrlSetStructuredText (parseText _string);
    dayz_humanitytarget = _string;
};

_array = [_foodVal,_thirstVal];
_array

 

Sharing is caring :)

 

Help is a strong word. lets say rub it in peoples faces

 

Nice work cen being using this for a while and its brilliant

Many thanks

Link to comment
Share on other sites

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
×
×
  • Create New...