Jump to content

[HOWTO] Adding a player statusBar


piX

Recommended Posts

EPOCH_playerCrypto

 

gives me a value of 'any'  when i have krypto on my player.

 

Anyone else experiencing this?

((uiNamespace getVariable "osefStatusBar")displayCtrl 1000)ctrlSetText format["DAMAGE: %1 | STAMINA: %2 | HUNGER: %3 | THIRST: %4 | KRYPTO: %5 | ", damage player, EPOCH_playerStamina, EPOCH_playerHunger, EPOCH_playerThirst, EPOCH_playerCrypto];
Link to comment
Share on other sites

  On 1/16/2015 at 8:51 PM, celticwarrior06 said:

Is there a way you can take out the restart time on the bar??

Yes, remove the text and remove the variable that defines it

 

  On 1/16/2015 at 3:13 AM, Ace22 said:

 

EPOCH_playerCrypto

 

gives me a value of 'any'  when i have krypto on my player.

 

Anyone else experiencing this?

((uiNamespace getVariable "osefStatusBar")displayCtrl 1000)ctrlSetText format["DAMAGE: %1 | STAMINA: %2 | HUNGER: %3 | THIRST: %4 | KRYPTO: %5 | ", damage player, EPOCH_playerStamina, EPOCH_playerHunger, EPOCH_playerThirst, EPOCH_playerCrypto];

Weird, share your whole file... but that should be fine. How does it look in your debug menu? Does it display or is it the same?

 

 

The OP's version is retarded and broken, good luck

Link to comment
Share on other sites

19.01.2015 00:46:29: PLAYERNAME (IP:PORT) GUID - #20 "4654.62,9593.63,0] nearestObject 145260) setDamage 1;
}; 


[] execVM "scripts\fn_statusBar.sqf";"

I keep getting this and I have added the exception on line 21:

7 exec !="<execute expression=" !"RscDebugConsole_execute" !"execFSM" !"_executeStackedEventHandler" !"fn_execVM" !"fn_moduleExecute" !"fn_execRemote" !"fn_MPexec" !"bis_fnc_moduleExecute_activate" !"fn_tridentExecute" !"randomize" !"executed from" !"EPOCH_DebugGUI_exec" !"_handle = [_display] execVM _script;" !"execVM \"\A3\Structures_F\scripts" !="execVM \"\A3\Structures_F_EPC\Civ\PlayGround\scripts\Carousel_spin.sqf\"" !"if (isServer) then {[] execVM 'run.sqf';};" !"preprocessfilelinenumbers \"A3\ui_f\scripts\initDisplay.sqf\";execVM \"\x\addons\a3_epoch_code\system\dummy.sqf\"},{[\"onUnload\",_t" !="(_this select 0) execVM \"\A3\Soft_F_Bootcamp\Offroad_01\scripts\repair_init.sqf\"" !="fn_Exec" !="execVM \"\MPMissions\epoch.Altis\scripts\fn_statusBar.sqf\""

Not sure what is wrong... Help is greatly appreciated

Link to comment
Share on other sites

  On 1/19/2015 at 6:49 AM, techfreaktwo said:
19.01.2015 00:46:29: PLAYERNAME (IP:PORT) GUID - #20 "4654.62,9593.63,0] nearestObject 145260) setDamage 1;
}; 


[] execVM "scripts\fn_statusBar.sqf";"

I keep getting this and I have added the exception on line 21:

7 exec !="<execute expression=" !"RscDebugConsole_execute" !"execFSM" !"_executeStackedEventHandler" !"fn_execVM" !"fn_moduleExecute" !"fn_execRemote" !"fn_MPexec" !"bis_fnc_moduleExecute_activate" !"fn_tridentExecute" !"randomize" !"executed from" !"EPOCH_DebugGUI_exec" !"_handle = [_display] execVM _script;" !"execVM \"\A3\Structures_F\scripts" !="execVM \"\A3\Structures_F_EPC\Civ\PlayGround\scripts\Carousel_spin.sqf\"" !"if (isServer) then {[] execVM 'run.sqf';};" !"preprocessfilelinenumbers \"A3\ui_f\scripts\initDisplay.sqf\";execVM \"\x\addons\a3_epoch_code\system\dummy.sqf\"},{[\"onUnload\",_t" !="(_this select 0) execVM \"\A3\Soft_F_Bootcamp\Offroad_01\scripts\repair_init.sqf\"" !="fn_Exec" !="execVM \"\MPMissions\epoch.Altis\scripts\fn_statusBar.sqf\""

Not sure what is wrong... Help is greatly appreciated

 

 

Is you server Altis?

Link to comment
Share on other sites

  On 1/11/2015 at 3:47 AM, fr1nk said:

Just tried and EPOCH_playerBank returns a value of "any". Tried interacting (deposit/withdrawal) with an ATM to see if that would trigger an update, but no luck.

 

fr1nk, any luck on getting bank to display?

Link to comment
Share on other sites

  On 1/11/2015 at 3:47 AM, fr1nk said:

Just tried and EPOCH_playerBank returns a value of "any". Tried interacting (deposit/withdrawal) with an ATM to see if that would trigger an update, but no luck.

 

EPOCH_bankBalance works for me.  It will show "0" until you interact with the ATM, then it will show your bank balance.

Link to comment
Share on other sites

  On 1/19/2015 at 6:38 PM, Bugtoy said:

EPOCH_bankBalance works for me.  It will show "0" until you interact with the ATM, then it will show your bank balance.

 

I think I tried EPOCH_bankBalance after EPOCH_playerBank. Guess I forgot to interact with an ATM then. Probably saw the 0 and was lazy and decided to drop it. Good to know though  :)

Link to comment
Share on other sites

 
  On 1/23/2015 at 1:23 PM, randymiller7 said:

I would like to move this to the top of the screen how would you do that


Darth has a good explanation here:

 

  On 1/1/2015 at 6:10 PM, Darth_Rogue said:

In statusBar.hpp play with these values:

class statusBarText {
			idc = 1000;
			x = safezoneX + safezoneW - 2.0;
			y = safezoneY + safezoneH - 0.04;
			w = 1.25;
			h = 0.04;

the x value is left and right.  A higher value moves it all further to the left

 

the w value is how wide the bar is.  A higher value will give you more room to add stuff

 

When you change the width you will also have to change the left/right values to keep it centered.  You'll just have to play with it until you get it how you want.

Link to comment
Share on other sites

Just a quick Question I want to add a percent sign on the end of the Hunger Thirst and Damage but i cant figure out how to add the %   Here is what I have and the math works but yeah....

((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 - 1) * -100), EPOCH_playerCrypto, (EPOCH_playerHunger / 5000 * 100), (EPOCH_playerThirst / 2500 * 100), mapGridPosition player, _hours, _minutes, _counter];

Thanks! 

Link to comment
Share on other sites

  On 1/26/2015 at 1:09 PM, phenomax said:

I dont know if this kind of math works, but try 

((EPOCH_playerHunger / 5000( * 100), ((EPOCH_playerThirst / 2500) * 100),

Just an idea

Greez

 

Well the math isnt the problem i just cant get the percent sign after it to show up... like using % or "%" ...etc... not sure if i have to use a code or something for it

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