Jump to content

Coins and Banking do not display properly in HUD


Recommended Posts

Hello All,

I Have 2 problems

 

When I login to the server I see that I have 25 coins, when I go to a safe or a laptop I am able to transfer coins to the bank. I then verified that it was in fact writing to the database ( I transferred 11 coins to my bank out of 25) the DB shows the coins in my banking_data under the column BankSalado as 11 however my HUD does not show anything when I relog. the same goes for my coins I show 14 coins under CashMoney in my character_data table but when I relog I see 25 coins on my HUD.

The second problem is when I relog and try to access the bank either thru remote banking or thru the laptop I do not show any coins in the bank. and I can not remove any, however my database has not changed, I still show the same amounts in the above mentioned line.

 

Any thoughts on this?

Link to comment
Share on other sites

Hi Zupa,

I did some more testing and now I get the banking at the laptops are displaying the correct amount. however the Player hud is still not correct, I am posting my player Hud below. also I am using souls variable and hive.

 

 

 

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;
    
    AsReMixhud_zombieKills     = _thePlayer getVariable["zombieKills",0];
    AsReMixhud_headshots         = _thePlayer getVariable["headShots",0];
    AsReMixhud_killsH         = _thePlayer getVariable["humanKills",0];
    Zupa_bank         =  _thePlayer getVariable["bank",0];
    AsReMixhud_killsB         = _thePlayer getVariable["banditKills",0];
    AsReMixhud_humanity         = _thePlayer getVariable["humanity",0];
    AsReMixhud_zombies         = "";
    AsReMixhud_zombiesAlive   = "";
    AsReMixhud_blood            =  "";
    AsReMixhud_pid            = "";
    AsReMixhud_puid            = "";
    AsReMixhud_hmnicon         = "";
    AsReMixhud_fps             = (round diag_fps);
    AsReMixhud_svrname        = "Amnesia";
    
    _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];};
    

    //if(AsReMixhud_humanity >= 5000) then { AsReMixhud_hmnicon = "<img size='0.8' image='addons\playerhud\icons\As_hmhero.paa'/>"; };
    //if((AsReMixhud_humanity >= 200) && (AsReMixhud_humanity <= 4999)) then { AsReMixhud_hmnicon = "<img size='0.8' image='addons\playerhud\icons\As_hmcivil.paa'/>"; };
//    if(AsReMixhud_humanity <= 199) then { AsReMixhud_hmnicon = "<img size='0.8' image='addons\playerhud\icons\As_hmbandit.paa'/>"; };
    
    _vitals ctrlSetStructuredText parseText format ["
        <t size='0.8' align='right'>Zupa - AsRemix</t><br/>
        <t size='0.9'> %2 %5 </t><img size='0.8' align='right' image='addons\playerhud\icons\As_humanity.paa'/>  <br/>
        <t size='0.9'> %3 </t><img size='0.8' align='right' image='addons\playerhud\icons\dollars.paa'/>   <br/>
        <t size='0.9'> %14 </t><img size='0.8' align='right' image='addons\playerhud\icons\equip_safe_CA.paa'/>   <br/>
        <t size='0.9'> %10 </t><img size='0.8' align='right' image='addons\playerhud\icons\As_killh.paa'/>  <br/>
        <t size='0.9'> %9 </t><img size='0.8' align='right' image='addons\playerhud\icons\As_killb.paa'/>  <br/>
        <t size='0.9'> %4 </t><img size='0.8' align='right' image='addons\playerhud\icons\As_zkill.paa'/>  <br/>
    <t size='0.8' align='right'>%13 FPS</t><br/>    
    <t size='0.8' align='right'>%11h %12min UPTIME</t><br/>",
    AsReMixhud_blood,   //1
    AsReMixhud_humanity,//2
    AsReMixhud_headshots,//3
    AsReMixhud_zombiekills,//4
    AsReMixhud_hmnicon,//5
    name player,//6
    AsReMixhud_zombiesAlive,//7
    AsReMixhud_zombies,//8
    AsReMixhud_killsB,//9
    AsReMixhud_killsH,//10
    _hours,//11
    _minutes2,//12
    AsReMixhud_fps,//13
    Zupa_bank,//14
    AsReMixhud_svrname//15
    ];
    _vitals ctrlCommit 0;
        
    sleep 2;
};

Link to comment
Share on other sites

Hi Zupa,

I did some more testing and now I get the banking at the laptops are displaying the correct amount. however the Player hud is still not correct, I am posting my player Hud below. also I am using souls variable and hive.

 

You're completely lacking 'cashMoney' variable in that code. You're just displaying headshots in your cash row (considering there's a dollar sign next to it). And your bank variable is wrong.

 

If you're using Soul's DLL you should also use his updated files. This is the one you should be using:

 

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;
	
	AsReMixhud_zombieKills 	= _thePlayer getVariable["zombieKills",0];
	AsReMixhud_headshots 		= _thePlayer getVariable["headShots",0];
	AsReMixhud_killsH 		= _thePlayer getVariable["humanKills",0];
	_cashMoney 		= _thePlayer getVariable["cashMoney",0];
    _bankMoney 		=  _thePlayer getVariable["bankMoney",0];
	AsReMixhud_killsB 		= _thePlayer getVariable["banditKills",0];
	AsReMixhud_humanity 		= _thePlayer getVariable["humanity",0];
	AsReMixhud_zombies 		= "";
	AsReMixhud_zombiesAlive   = "";
	AsReMixhud_blood			=  "";
	AsReMixhud_pid			= "";
	AsReMixhud_puid			= "";
    AsReMixhud_hmnicon 		= "";
	AsReMixhud_svrname		= "servertitle";

	_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];};
    	
	_vitals ctrlSetStructuredText parseText format ["
		<t size='0.9'> %2 %5 </t><img size='0.8' align='right' image='custom\playerhud\icons\As_humanity.paa'/>  <br/> 
		<t size='0.9'> %3 </t><img size='0.8' align='right' image='custom\playerhud\icons\dollars.paa'/>   <br/>
		<t size='0.9'> %13 </t><img size='0.8' align='right' image='custom\playerhud\icons\equip_safe_CA.paa'/>   <br/>
		<t size='0.9'> %10 </t><img size='0.8' align='right' image='custom\playerhud\icons\As_killh.paa'/>  <br/> 
		<t size='0.9'> %9 </t><img size='0.8' align='right' image='custom\playerhud\icons\As_killb.paa'/>  <br/>
		<t size='0.9'> %4 </t><img size='0.8' align='right' image='custom\playerhud\icons\As_zkill.paa'/>  <br/>	
	<t size='0.8' align='right'>%11h %12min UPTIME</t><br/>",
	AsReMixhud_blood,   //1
	AsReMixhud_humanity,//2
	[_cashMoney] call BIS_fnc_numberText,//3
	AsReMixhud_zombiekills,//4
	AsReMixhud_hmnicon,//5
	name player,//6
	AsReMixhud_zombiesAlive,//7
	AsReMixhud_zombies,//8
	AsReMixhud_killsB,//9
	AsReMixhud_killsH,//10
	_hours,//11
	_minutes2,//12
	[_bankMoney] call BIS_fnc_numberText,//13
	];
	_vitals ctrlCommit 0;
        
    sleep 2;
};

Link to comment
Share on other sites

 Zupa,

Using the player hud you provided I no longer get the HUD to show. I also went back and double checked my original files from Soul and the player hud is the one listed in the earlier part of my message. is there an update top souls files?

if I go back to the one that was in Souls zip file it will show on the screen however I still get the wrong info in the HUD.

I believe this is due to the fact that cash money and Bank are not defined in his HUD.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...