Jump to content

[Tutorial] Custom Debug / Stats


Recommended Posts

Those 2 images are in the playerhud, u can just copy paste them from the single currency mod.

 

A bit of effort guys! Allot of questions could be avoided.

 

Both icons can be found in the playerhud icon folder:

 

https://github.com/EpochSC/SingleCurrencyBanking999/tree/master/A.Installation_Method_%231_Add_to_a_new_Epoch_server_quickly/B.Mission_File/DayZ_Epoch_11.Chernarus/addons/playerhud/icons

 

paa are optimised images for arma.

Link to comment
Share on other sites

Thanks Zupa i have installed this my playerhud.sqf

 

disableSerialization;
 
// player setVariable["AsReMixhud", true];//Variable Show/Hide HUD Support for control player hud
 
AsReMixhud_Control = true; // player getVariable["AsReMixhud",true];
 
 
while {true} do
{
    1000 cutRsc ["AsReMixhud","PLAIN"];
    _wpui = uiNameSpace getVariable "AsReMixhud";
    _vitals = _wpui displayCtrl 4900;
 
_thePlayer = player;
 
_cashMoney = _thePlayer getVariable["cashMoney",0];
    _bankMoney =  _thePlayer getVariable["bankMoney",0];
 
_vitals ctrlSetStructuredText parseText format ["
<t size='0.9'> %1 </t><img size='0.8' align='right' image='addons\playerhud\icons\dollars.paa'/>   <br/>
<t size='0.9'> %2 </t><img size='0.8' align='right' image='addons\playerhud\icons\equip_safe_CA.paa'/>   <br/>",
[_cashMoney] call BIS_fnc_numberText,
[_bankMoney] call BIS_fnc_numberText
];
_vitals ctrlCommit 0;
        
    sleep 2;
};
 
 
one problem is that the coins are not showing on the icons or in the safe but players have the coins on them and in there safe. just says 0 have even tried to relog still the same. also i would like to lower it down a little so its in the middle of the screen and not the top right if u could help me please.
Link to comment
Share on other sites

 

Thanks Zupa i have installed this my playerhud.sqf

 

disableSerialization;


// player setVariable["AsReMixhud", true];//Variable Show/Hide HUD Support for control player hud


AsReMixhud_Control = true; // player getVariable["AsReMixhud",true];




while {true} do
{
    1000 cutRsc ["AsReMixhud","PLAIN"];
    _wpui = uiNameSpace getVariable "AsReMixhud";
    _vitals = _wpui displayCtrl 4900;


_thePlayer = player;


_cashMoney  = _thePlayer getVariable["cashMoney",0];
    _bankMoney  =  _thePlayer getVariable["bankMoney",0];


_vitals ctrlSetStructuredText parseText format ["
<t size='0.9'> %1 </t><img size='0.8' align='right' image='addons\playerhud\icons\dollars.paa'/>   <br/>
<t size='0.9'> %2 </t><img size='0.8' align='right' image='addons\playerhud\icons\equip_safe_CA.paa'/>   <br/>",
[_cashMoney] call BIS_fnc_numberText,
[_bankMoney] call BIS_fnc_numberText
];
_vitals ctrlCommit 0;
        
    sleep 2;
};
 
one problem is that the coins are not showing on the icons or in the safe but players have the coins on them and in there safe. just says 0 have even tried to relog still the same. also i would like to lower it down a little so its in the middle of the screen and not the top right if u could help me please.

 

 

Are u using 1.1 999 or 2.0 Souls version?

Link to comment
Share on other sites

1.1 999 got it from your website.

 

Then change these 2 lines:

_cashMoney  = _thePlayer getVariable["cashMoney",0];
_bankMoney  =  _thePlayer getVariable["bankMoney",0];

to

_cashMoney  = _thePlayer getVariable["headShots",0];
_bankMoney  =  _thePlayer getVariable["bank",0];
Link to comment
Share on other sites

Note i need to double check those height shit, cus i see i use

safezoneW;

in

y = safezoneY + 0.10 * safezoneW;

which should be (not really sure, gotta look it up)

safezoneH;

BIG NOTE:

 

HEIGHT AND WIDTH  goes from 0 to 1;  E.G : 0.25 or 0.59 or 1 or 0.99

Link to comment
Share on other sites

I keep getting Any values for the debug.

I'll see what I can fix and ill post it here if I make some progress

Still having problems...

Anyone got a fix for this?

Players, blood, kills and FPS work perfectly. Everything else doesn't.

 

 

Can you show us your playerhud.sqf?

Link to comment
Share on other sites

I keep getting Any values for the debug.

I'll see what I can fix and ill post it here if I make some progress

Still having problems...

2014-08-31_00001_zps6dd08220.jpg

Anyone got a fix for this?

Players, blood, kills and FPS work perfectly. Everything else doesn't.

 

Look in the code and change the variables.

 

SO many problems can be solved by just looking at the code. if you got any coding experience it's a piece of cake.

 

Even people that never got programming can understand basicly what it says.

 

Check if the variables are correct with whatever is not working.

Link to comment
Share on other sites

Look in the code and change the variables.

 

SO many problems can be solved by just looking at the code. if you got any coding experience it's a piece of cake.

 

Even people that never got programming can understand basicly what it says.

 

Check if the variables are correct with whatever is not working.

i made myself a custom one a while back, that seems to be perfect now :D

Link to comment
Share on other sites

Anyone else run into the issue of having the custom HUD flash intermittently?  Ours is flashing every few seconds, have tried increasing the duration value, but to no avail. 

 

Ideas?

 

It will most likely flash as it need to update and it just normal text format

 

Make the sleep time higher should do this less

Link to comment
Share on other sites

Look in the code and change the variables.

 

SO many problems can be solved by just looking at the code. if you got any coding experience it's a piece of cake.

 

Even people that never got programming can understand basicly what it says.

 

Check if the variables are correct with whatever is not working.

Ahh ok the playerhud on the download has the variables in the wrong order (out by 1), guessing you added a variable but didn't shuffle the numbers.

Fixed:

 

/*  

Author : AsReMixhud

Edited By : Peter Beer

Credit : AsReMixhud , Zupa

*/

disableSerialization;

AsReMixhud_Control = true;

while {true} do

{

    1000 cutRsc ["AsReMixhud","PLAIN"];

    _wpui = uiNameSpace getVariable "AsReMixhud";

    _vitals = _wpui displayCtrl 4900;

    _Player = player;

    AsReMixhud_zombieKills     =     _Player getVariable["zombieKills",0];

    AsReMixhud_headshots     =     _Player getVariable["cashMoney",0];

    AsReMixhud_killsH         =     _Player getVariable["humanKills",0];

    Bank_Balance                 =     _Player getVariable["bankMoney",0];

    AsReMixhud_killsB         =     _Player getVariable["banditKills",0];

    AsReMixhud_humanity         =     _Player getVariable["humanity",0];

    AsReMixhud_blood            =     _Player getVariable["USEC_BloodQty",12000];

    AsReMixhud_fps             =     (round diag_fps);

    AsReMixhud_svrname        =     "[uMP]Epoch";

    AsReMixhud_Players        =     {isPlayer _x} count _players;

    _players = [];

    {

        _y = _x;

        if (isPlayer _y) then

            {

                {_players = _players + [_x];} forEach (crew _y);

            };

    } forEach ([0,0,0] nearEntities ['AllVehicles', 10000000]);

    _stime = 0;

    if(serverTime > 36000)then{_stime = time;}else{_stime = serverTime;};

    _hours = (_stime/60/60);

    _hours = toArray (str _hours);

    _hours resize 1;

    _hours = toString _hours;

    _hours = compile _hours;

    _hours = call  _hours;

    _minutes = floor(_stime/60);

    _minutes2 = ((_minutes - (_hours*60)) min 60) max 0;if (_minutes2 < 10) then {_minutes2 = format ['0%1',_minutes2];};

    _nearestCity = nearestLocations [getPos player, ['NameCityCapital','NameCity','NameVillage','NameLocal'],750];

    _textCity = 'Wilderness';

    if (count _nearestCity > 0) then {_textCity = text (_nearestCity select 0)};

    if(AsReMixhud_humanity >= 5000) then { AsReMixhud_hmnicon = "<img size='0.9' image='addons\playerhud\icons\HeroHumanity.paa'/>"; };

    if((AsReMixhud_humanity >= 200) && (AsReMixhud_humanity <= 4999)) then { AsReMixhud_hmnicon = "<img size='0.9' image='addons\playerhud\icons\CivHumanity.paa'/>"; };

    if(AsReMixhud_humanity <= 199) then { AsReMixhud_hmnicon = "<img size='0.9' image='addons\playerhud\icons\BanditHumanity.paa'/>"; };

    

    _vitals ctrlSetStructuredText parseText format ["

    <t size='0.8' align='right'>~~~[uMP] EPOCH~~~</t><br/>

    <t size='0.9'> %1 </t><img size='0.9' align='right' image='addons\playerhud\icons\Players.paa'/><br/>

    <t size='0.9'> %2 </t><img size='0.9' align='right' image='addons\playerhud\icons\Health.paa'/><br/>

    <t size='0.9'> %3 %4 </t><br/>

    <t size='1' font='Bitstream' align='left' color='#7D8D70'>Location: </t><t size='1' font='Bitstream' align='right'>%13</t><br/>

    <t size='0.9'> £%5 </t><img size='0.9' align='right' image='addons\playerhud\icons\Money.paa'/><br/>

    <t size='0.9'> £%6 </t><img size='0.9' align='right' image='addons\playerhud\icons\Bank.paa'/><br/>

    <t size='0.9'> %7 </t><img size='0.9' align='right' image='addons\playerhud\icons\HeroKills.paa'/><br/>

    <t size='0.9'> %8 </t><img size='0.9' align='right' image='addons\playerhud\icons\BanditKills.paa'/><br/>

    <t size='0.9'> %9 </t><img size='0.9' align='right' image='addons\playerhud\icons\ZombieKills.paa'/><br/>

    <t size='0.9'> %10h %11min </t><img size='0.9' align='right' image='addons\playerhud\icons\Uptime.paa'/><br/>

    <t size='0.9'> %12 </t><img size='0.9' align='right' image='addons\playerhud\icons\Fps.paa'/><br/>

    <t size='0.8' align='right'>~~~~~~~~~~~~~~~~~</t><br/>",

    AsReMixhud_Players,//1

    AsReMixhud_blood,//2

    [AsReMixhud_humanity] call BIS_fnc_numberText,//3

    AsReMixhud_hmnicon,//4

    [AsReMixhud_headshots] call BIS_fnc_numberText,//5

    [bank_Balance] call BIS_fnc_numberText,//6

    AsReMixhud_killsH,//7

    AsReMixhud_killsB,//8

    AsReMixhud_zombiekills,//9

    _hours,//10

    _minutes2,//11

    AsReMixhud_fps,//12

    _textCity//13

    ];

    _vitals ctrlCommit 0;

    sleep 10;

};

 

However I still get "any" as the player count and I'm scratching my head on that.

I've also added location to this but haven't gotten around to uploading a suitable Icon yet so I've simply left the text in.

Link to comment
Share on other sites

Do I just call this from my init.sqf?

 

Also is Soul's version the regular one?

 

Soul's version is the most supported (and recommended) one at the moment. If you don't have Soul's DLLs don't use that because it simply won't work.

 

Do you call what from init.sqf? If you're talking about the custom debug in general - no. Just replace the files over Single Currency's original playerhud folder.

Link to comment
Share on other sites

Sorry for the late reply man, just woke up =p

Not sure if you still need it but yeah

 

In your Init below DZE_ConfigTrader = true; add

DZE_AsReMix_PLAYER_HUD = true; //Open Custom     AsReMix Player HUD

 

Then, still in your init under !isDedicated you add

if (DZE_AsReMix_PLAYER_HUD) then {
    execVM "addons\playerhud\playerHud.sqf"//AsReMix Player HUD

 

Anyone know what I'm doing wrong with the player count though, I'm still getting "Any"

Link to comment
Share on other sites

Sorry for the late reply man, just woke up =p

Not sure if you still need it but yeah

 

In your Init below DZE_ConfigTrader = true; add

DZE_AsReMix_PLAYER_HUD = true; //Open Custom     AsReMix Player HUD

 

Then, still in your init under !isDedicated you add

if (DZE_AsReMix_PLAYER_HUD) then {

    execVM "addons\playerhud\playerHud.sqf"//AsReMix Player HUD

 

Anyone know what I'm doing wrong with the player count though, I'm still getting "Any"

 

make a new !isDedicated

 

on the bottom of your init

Link to comment
Share on other sites

Sorry for the late reply man, just woke up =p

Not sure if you still need it but yeah

In your Init below DZE_ConfigTrader = true; add

DZE_AsReMix_PLAYER_HUD = true; //Open Custom AsReMix Player HUD

Then, still in your init under !isDedicated you add

if (DZE_AsReMix_PLAYER_HUD) then {

execVM "addons\playerhud\playerHud.sqf"//AsReMix Player HUD

Anyone know what I'm doing wrong with the player count though, I'm still getting "Any"

If your getting that most likely you havent got the numbertext.sqf , numberdigits.sqf which is included with zupa 1.1

https://github.com/EpochSC/SingleCurrencyBanking/tree/master/999_Hive_Version/Version%201.1/PBOs/DayZ_Epoch_11.Chernarus/custom

Link to comment
Share on other sites

  • 2 weeks later...

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