Jump to content

[RELEASE] Status Bar With Icons & Server FPS display v1.36


Darth_Rogue

Recommended Posts

change

if ((getPlayerUID player) in admin_list) then 
{ 

into

if ((getPlayerUID player) in [
"0" //admins id goes here
                                                                 
]) then { 

:)

 

Sorry that was my fail! I added that line cause i read out the Admins UIDs from a different File from the Server root folder :ph34r:

Link to comment
Share on other sites

UPDATED!!

ChangeLog:

1.2
 - [Added] Toxicity display
 - [Added] Icon for toxicity (Thanks, Nightmare!)
 - [Added] Switch to turn the world space coords on or off for admins
 - [Changed] Separated files to make editing of different bar types (player/admin/admin with world space) more clear and less prone to mistake
 - [Changed] Realigned the bar for the added toxicity display
 - [Fixed] Issue with admin ids referring to a global variable not present for those without Infistar AH tools

I changed the folder structure back to the way I had it originally.  It's recommended to replace ALL files related to the status bar for this update to prevent pathing errors and update your init.sqf with the new init_statusBar file.

Link to comment
Share on other sites

Doenst work for me no Errors in CLient RPT or Server RPT  like this looks my Description.ext last lines

 

class cfgMusic
{
    class intro
    {
        name = "Intro";
        sound[] = {"sounds\IntroSong.ogg", db 1, 1};
    };
    class shocker
    {
        name = "electrocute";
        // filename, volume, pitch
        sound[] = {"sounds\electrocute.ogg", 1, 1};
        titles[] = {};
    };        
};
class RscTitles
{
    #include "statusBar.hpp"
};

 

 

Like this is my Init.sgf

 

// -----------------Weather
[] execVM "scripts\weather.sqf";
// -----------------Color Correction
[] execVM "effect.sqf";
// ---------------- FN Statusbar
if(hasInterface) then{[] execVM "fn_statusbar_with_icons.sqf"};

 

everything done like said in install Instructions

 

Server Starts but no Statusbar showing up...

Link to comment
Share on other sites

I can only think of two possible reasons for the status bar not working but not giving any error. It's possible that Infistar may be blocking it. Check the allowed dialogs section in run.sqf and temporarily disable the checks and see if that works. If so, then add 55553,55554,55555 to the allowed dialogs list and reenable the checks.

The only other reason would be that the mission file you added the status bar to isn't the same one that's loading when the server starts.

Link to comment
Share on other sites

I can only think of two possible reasons for the status bar not working but not giving any error. It's possible that Infistar may be blocking it. Check the allowed dialogs section in run.sqf and temporarily disable the checks and see if that works. If so, then add 55553,55554,55555 to the allowed dialogs list and reenable the checks.

The only other reason would be that the mission file you added the status bar to isn't the same one that's loading when the server starts.

 

There is no problem with the bar, working well with the install instructions from the GitHub:

 

Owm25rY.jpg

 

I dont added any new BE filters or something.

Link to comment
Share on other sites

You could try using near entities to find how many players are nearby, its how my mission system cleanups work and it seems to work alright.

_playersNearbyRadius = 300; /* Distance to count nearby players */
_playersNearby = count (player nearEntities['Man',_playersNearbyRadius]);
However near entities and near objects are fairly resource intensive so might be better to only have this scan every 10 seconds for example.

Well I went ahead and am testing this in my current ZHUD/statusbar.

Its default as written during the first test.

Successful, However we will need to add a '-1' to the formula or it will count yourself.

_playersNearbyRadius = 300; /* Distance to count nearby players */
_playersNearby = count (player nearEntities['Man',_playersNearbyRadius]);

AND FOR THE STATUSBAR USE "_playersNearby -1"
Also consider reducing distance to 50 or 75m to not become too OP.
Link to comment
Share on other sites

nice idea ...

 

however, the script is spamming this endlessly in the client rpt when i switch off worldspace coords:

 5:47:32 Wrong color format 151/171

and none of them actually shows worldspace or gridcoords for me, also whatever you are showing by the running man icon is wierd (guess it should have been stamina?), sometimes it will just keep going up, my guess is you changed some variables and forgot about it at some point or you fucked up some format line.

 

i did not have time to go through this and find the error, but a good idea would also be to change all instances of player to vehicle player, so it shows correctly even when the player is inside a vehicle.

 

edit:

another thing is that if you do not need to use a global variable then dont, as it is remebered by the engine after the script ends, if you did not understand, then i am reffering to WSC in init_statusBar.sqf, you also do not need to check the players uid twice as it will have already skipped that block of code if the player id did not match the first time.

 

edit:

aparently it dosnt change size when switching to windowed mode, my mistake

Link to comment
Share on other sites

Thanks for the tips.  I'll look into making some changes for a future version.  I don't know the cure for the wrong color format error.  It's been there since before I took this script over.  The color formatting is correct from what I've seen, since all the colors display correctly in the status bar.  All the color settings are identical between the admin bar with world space and the one without, so it doesn't make sense why the error would only occur when WSC is off.  

 

Yes, the running man icon is a measure of player stamina.  Stamina values will increase the longer your character is alive.  If you spawn into the world with a stamina value of 100 and you run around it will gradually decrease.  If you stop and rest, your stamina goes back up, hence the climbing number.  A climbing number can also occur when you spawn into the world if you logged out without first fully recharging your stamina.  As you load in you are at rest, so your stamina value increases.  This is normal and expected behavior, not a fucked up format line.   If you have an idea for a different stamina icon that would be more functional or clear to players then feel free to create a fork of the project on Github and make a pull request with an alternate solution. 

 

I have WSC as a global variable in preparation for a future update, so it will be needed eventually.

 

My logic for using a two-part condition is necessary for the admin bar, since there has to be an option present to display either an admin bar with the world space coords, or one without depending on whether WSC is either true or false. In both cases, whether WSC is true or false, the admin UID must match the list in order to display one of the admin bar options. 

Link to comment
Share on other sites

Thanks for the tips.  I'll look into making some changes for a future version.  I don't know the cure for the wrong color format error.  It's been there since before I took this script over.  The color formatting is correct from what I've seen, since all the colors display correctly in the status bar.  All the color settings are identical between the admin bar with world space and the one without, so it doesn't make sense why the error would only occur when WSC is off.  

 

it its not nescesarrily a colour but perhaps a syntax error in a format line somewhere.

 

Yes, the running man icon is a measure of player stamina.  Stamina values will increase the longer your character is alive.  If you spawn into the world with a stamina value of 100 and you run around it will gradually decrease.  If you stop and rest, your stamina goes back up, hence the climbing number.  A climbing number can also occur when you spawn into the world if you logged out without first fully recharging your stamina.  As you load in you are at rest, so your stamina value increases.  This is normal and expected behavior, not a fucked up format line.   If you have an idea for a different stamina icon that would be more functional or clear to players then feel free to create a fork of the project on Github and make a pull request with an alternate solution. 

 

the running man icon is fine for stamina imho however something is wrong with the value (also something is wrong with worldspace and gridcoords).

 

 

I have WSC as a global variable in preparation for a future update, so it will be needed eventually.

 

you can parse a private variable to a script like this:

_myvar = "Hello";
[_myvar]execVM "myscript.sqf";

inside the script:

//return hello in systemchat
systemchat _this select 0;

My logic for using a two-part condition is necessary for the admin bar, since there has to be an option present to display either an admin bar with the world space coords, or one without depending on whether WSC is either true or false. In both cases, whether WSC is true or false, the admin UID must match the list in order to display one of the admin bar options. 

 

i understand your logic, however:

//player uid is 567
if(getplayeruid player in ["123","321"])then{
//this will never happend, no need to check again in this block
};

none of this is meant in a negative way and thanks for sharing your project

Link to comment
Share on other sites

Ok Darth i have found the Error maybe you can help now.

 

i had two ifhasinterface commands in Init:

//Status Bar
if(hasInterface) then{[] execVM "addons\Status_Bar\init_statusBar.sqf"};

and

// ----------------SEM
if(hasInterface)then{execVM "semClient.sqf"};

 

when i delete SEM Statusbar workd well !

 

Maybe you can help me how to combine them so both will run toghether ?

Link to comment
Share on other sites

Do it like this:

if (!isDedicated and hasInterface) then
{
//=====================================================================================================================
// Status Bar
//=====================================================================================================================
[] execVM "addons\Status_Bar\init_statusBar.sqf";
//=====================================================================================================================
// SEM
//=====================================================================================================================
[]execVM "semClient.sqf";
};

You need the if query not start more than once, leave it in one single if query and execute all  in one single.

Link to comment
Share on other sites

it its not nescesarrily a colour but perhaps a syntax error in a format line somewhere.

 

 

the running man icon is fine for stamina imho however something is wrong with the value (also something is wrong with worldspace and gridcoords).

 

 

 

you can parse a private variable to a script like this:

_myvar = "Hello";
[_myvar]execVM "myscript.sqf";

inside the script:

//return hello in systemchat
systemchat _this select 0;

i understand your logic, however:

//player uid is 567
if(getplayeruid player in ["123","321"])then{
//this will never happend, no need to check again in this block
};

none of this is meant in a negative way and thanks for sharing your project

 

 

Thank you for the constructive criticism.  I'm still learning this stuff and am always willing to learn and try new things.  This script is far from finished, so I will definitely take a look at some of these things moving forward.   :)

Link to comment
Share on other sites

Hello to all , I hope you can help me I have kept strictly to the installations instructions but without success can you please tell me where I got the error RTP ​​server also says nothing

sorry for my english

#include "infiSTAR_AdminMenu.hpp"
#include "ASORGS\menu.hpp"
author = "Epoch Mod Team";
class Header
{
 gameType = Sandbox;
 minPlayers = 1;
 maxPlayers = 100;
};
respawn = "BASE";
respawnDelay = 600;
respawnDialog = 0;

onLoadMission= "Epoch";
OnLoadIntro = "Welcome to Epoch Mod";
loadScreen = "\x\addons\a3_epoch_assets\pictures\loadScreen_ca.paa"; 
OnLoadIntroTime = False;
OnLoadMissionTime = False;
onLoadName = "Epoch Mod";
disabledAI = true;
scriptedPlayer = 1;
disableChannels[]={0,2,6};
enableItemsDropping = 0;
briefing = 0;
debriefing = 0;
enableDebugConsole = 0;
joinUnassigned = 0;
respawnOnStart = 0;
forceRotorLibSimulation = 0;

corpseManagerMode = 1;
corpseLimit = 10;
corpseRemovalMinTime = 1200;
corpseRemovalMaxTime = 3600;

wreckManagerMode = 1;
wreckLimit = 2;
wreckRemovalMinTime = 60;
wreckRemovalMaxTime = 360;

class CfgRemoteExecCommands {};

class CfgEpochClient
{
	buildingNearbyMilitary = 0; //1 to allow building nearby
	buildingNearbyMilitaryRange = 300; //Define radius of blocked area

	buildingRequireJammer = 0; // 1 = to allow building without a jammer 
	buildingCountLimit = 200; // how many objects can be built within range of a jammer 
	buildingJammerRange = 75; // jammer range in meters 

	class Altis
	{
		blockedArea[] = { //[POS],radius
				{ { 16085, 16997, 0 }, 250 }, //South Telos
				{ { 12844, 16714, 0 }, 120 }, //Soldner Base 
				{ { 3085, 13184, 0 }, 300 }, //Kavalar Carstel
				{ { 13493, 12013, 0 }, 450 }, //Makrynisi (Island)
				{ { 17439, 13165, 0 }, 165 }, //Pyrgorsk Military
				{ { 20084, 6728, 0 }, 55 }, //West of Selakano
				{ { 25303, 21807, 0 }, 100 } //Sofia	
		};
	};
	class Chernarus
	{
		blockedArea[] = {
				{ { 10203, 1886, 0 }, 430 }, //South Electro
				{ { 6822, 2498, 0 }, 600 }, //Cherno
				{ { 4612, 9670, 0 }, 140 }, //NWAF south barack
				{ { 4907, 10117, 0 }, 250 }, //NWAF NE hangas
				{ { 4707, 10384, 0 }, 200 }, //NWAF north barack
				{ { 4069, 10778, 0 }, 75 }, //NWAF west hangas
				{ { 4553, 10722, 0 }, 150 }, //NWAF NW hangas
				{ { 12279, 9505, 0 }, 350 }, //Berenzino Mid
				{ { 12816, 9816, 0 }, 400 }, //Berenzino SE
				{ { 12991, 10147, 0 }, 375 }, //Berenzino Docs
				{ { 2693, 5138, 0 }, 200 }, //Zeleno
				{ { 11467, 7508, 0 }, 150 }, //Polana Factory
				{ { 13092, 7096, 0 }, 140 } //Solnichniy Factory
		};
	};
};

class CfgEpochSapper
{
	detonateDistMax = 8; //Random distance between 3m and this number at which sapper detonates. Min value = 4
	groanTrig = 16; //Percentage chance of a groan. Min value = 4
	sRange = 300; //Distance from target over which sapper will dispose. Range within which sapper code will be aware of targets. Distance up to which sapper will attempt to find a spot to hide in. Min Value = 150.
	smellDist = 24; //Distance up to which sapper can smell. Used to decide if sapper can see target when deciding to charge and influences target selection. Is influenced by wind direction. Min Value = 8.
};

class CfgEpochUAV
{
	UAVMinDist = 48; //Minimum distance to choose next position when roaming. Min Value = 8.
	UAVMaxDist = 180; //Maximum distance to choose next position when roaming. Min Value = 42 / Max Value = 400.
	UAVHeight = 100; //Set height when roaming, slight randomness is applied to this value. UAV will choose own height when locked onto target. Min Value = 42 / Max Value = 280. UAV can still spot targets from height !
};



class CfgSounds
{
	sounds[] = {};
	class introSong
	{
		name="introSong";
		sound[] = {"custom\IntroSong.ogg", db+1,1};
		titles[] = {};
	};
	class Bam
	{
		// how the sound is referred to in the editor (e.g. trigger effects)
		name = "gunshot";
		// filename, volume, pitch
		sound[] = {"sounds\gunshot.ogg", 1, 1};
		titles[] = {};
	};
};

class RscTitles
{
	#include "scripts\player_systems\StatusBar\statusBar.hpp"
	
	class actionMenuItemShow
	{ 
		idd = 777; 
		duration = 99999; 
		name = "actionMenuItemShow";
		onLoad = "with uiNameSpace do { actionMenuItemShow = _this select 0 }";
		fadeIn = 0.2;
	};
};
class CfgFunctions
{
	#include "ASORGS\cfgfunctions.hpp"
};


Link to comment
Share on other sites

Does the WSC flag not work properly? When I set it to true and put myself in the sb_admin_list I still get the regular grid ref.

//Choose Options
//------------------------------------------------------------------------------------------------
WSC = true;  //Option whether to use and display world space coords in the admin status bar (true or false)

sb_admin_list = ["76561197970729264","76561198051873726","76561198081194367"];	
//------------------------------------------------------------------------------------------------

Any help appreciated.

Link to comment
Share on other sites

 

Hello to all , I hope you can help me I have kept strictly to the installations instructions but without success can you please tell me where I got the error RTP ​​server also says nothing

sorry for my english


 

 

This script runs totally client side, so the server RPT will be of no use.  Check your client RPT for any script errors and post them here.  

Link to comment
Share on other sites

Does the WSC flag not work properly? When I set it to true and put myself in the sb_admin_list I still get the regular grid ref.

//Choose Options
//------------------------------------------------------------------------------------------------
WSC = true;  //Option whether to use and display world space coords in the admin status bar (true or false)

sb_admin_list = ["76561197970729264","76561198051873726","76561198081194367"];	
//------------------------------------------------------------------------------------------------

Any help appreciated.

 

 

Try just using a single UID at a time and see if it works then and let me know. 

Link to comment
Share on other sites

this spam in rpt has to do with the default colour, im not sure why just yet, but it definitvle has to do with that colour ...

 

im currently trying to figure out whats going on so i also had a chance to go through the scripts and it is a bit of a mess in there and you can easy change it so you do not have to run two seperate files for admins, but meerly have an if statement to switch it between the two values within the script (possibly with a hotkey).

 

edit:

 

i think this actually happends when the text is too long for the display and it removes the text on the end ...

 

edit: 

 

i think i fixed it now, it semms like you where using the gps coords as a colour on the stamina picture, but this was not present on the one with woldspace, thats why that one did not come up with the error.

Link to comment
Share on other sites

Thanks for finding that!  I was going to go through it with a fine tooth comb today and try to squash that one.  Found in playerBar.sqf, line 176, toward the end of the line, color='16' should be color='15'.  Fixed it in my files and on Github.

 

I originally had all three parts of the script merged into a single file, separated by if statements, but the more I added the tougher it got to make sure I was making edits to the correct section. It was just getting too big and complicated when all of them were merged into one.   I figured that if I was having trouble keeping track of which section I was editing, other people would too, so I decided to save myself some support headaches and split them up.   :)

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...