Jump to content

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


Darth_Rogue

Recommended Posts

Thanks a lot for that suggestion, Legend. Unfortunately the init suggestion didn't get it to work. 

 

I don't know jack when it comes to scripting, so cleaning anything up would inevitably destroy my server with my luck haha.

 

 

Try this one

 

if (isServer) then {
    execVM "\q\addons\traderATMs\init.sqf";
    fn_getBuildingstospawnLoot = compile preProcessFileLineNumbers "LSpawner\fn_LSgetBuildingstospawnLoot.sqf"; 
    Sdeleter = compile preProcessFileLineNumbers "LSpawner\LSdeleter.sqf";
    execVM "LSpawner\Lootspawner.sqf";
};

[] ExecVM "scripts\R3F_ARTY_AND_LOG\init.sqf";
//[] execVM "Cloak\Activatecloak.sqf";
[] execVM "bon_recruit_units\Activate.sqf";
cutRsc ["CLOAK_BAR","PLAIN"];
[] execVM "scripts\tags.sqf";
[] execVM "bon_recruit_units\init.sqf";
execVM "scripts\txt.sqf";
execVM "scripts\zone.sqf";
execVM "scripts\fn_welcome.sqf";
[] execVM "wai\remote.sqf";
[] execVM "trader\init.sqf";
[] execVM "trader\resetvehicleammo.sqf";
[] execVM "trader\HALV_takegive_crypto_init.sqf"; 





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

// EnergyBoost
[] execVM "EnergyBoost.sqf";
systemchat("EnergyBoost activated...");
 
};
 
 
// --->
// Copy & paste the below into your mission init.sqf
// <---
 
// Debug
DMC_DEBUG_MAPCENTER = FALSE;
DMC_DEBUG_NEARESTLOCATIONS = FALSE;
DMC_DEBUG_STARTINGPOSITIONS = FALSE;
DMC_DEBUG_PATROLWAYPOINTS = FALSE;
 
// Now whenever you want to spawn air patrols just call the precompiled function like this
private ["_air_patrol"];
_air_patrol = [
5000, // Search radius for patrol locations (Starting from map center position)
  [ // Array of air patrol starting positions (Use whatever you like. Just make sure the result is a 2D position in format [x,y])
  getMarkerPos "air",
  getMarkerPos "cloak"
],
  // "B_Heli_Light_01_F", // MH-9 Hummingbird
"B_Heli_Light_01_armed_F", // AH-9 Pawnee
  // "B_Heli_Transport_01_F", // UH-80 Ghost Hawk
  // "B_Heli_Transport_01_camo_F", // UH-80 Ghost Hawk
  //"B_Heli_Attack_01_F", // AH-99 Blackfoot
GUER, // Side of air patrol (West,East,Guer,Civ)
  150, // Patrol altitude (Meters above ground)
  "RED", // Patrol combat mode (Blue / Green / White / Yellow / Red)
  "COMBAT", // Patrol behaviour (Careless / Safe / Aware / Combat)
  "FULL", // Patrol speed (Limited / Normal / Full)
  "DESTROY", // Waypoint type (Move / Sad / Destroy)
1.0, // Skill of the crew steering the patrol vehicle (0.0 - 1.0)
4, // Amount of air patrols to spawn (spawn positions will be randomized based on above defined marker locations)
  3600, // Minimum patrol time (used as timer for alive / canMove check)
  TRUE // Randomize waypoints (True / False)
] call DMC_fnc_spawnAirPatrol;
 
// --->
// Copy & paste the above into your mission init.sqf
// <---

Link to comment
Share on other sites

Im getting script restriction kicks #0 I did as install said but im using infistar also. Here is my scripts.txt

 

http://pastebin.com/TRJfGcxW

 

line 20    7 allowDamage !="player allowDamage true;vehicle player allowDamage true;" playableunits !=""pto: %3 | Players: %2 | FPS: %1 ", round diag_fps, count playableUnits, EPOCH_playerCrypto, mapGridPosition player];"

 

line 23    7 onMapSingleClick !="onMapSingleClick '';" exec !"addons\status_bar\init_statusBar.sqf"

Link to comment
Share on other sites

Try changing this:

line 20    7 allowDamage !="player allowDamage true;vehicle player allowDamage true;" playableunits !=""pto: %3 | Players: %2 | FPS: %1 ", round diag_fps, count playableUnits, EPOCH_playerCrypto, mapGridPosition player];"
 
line 23    7 onMapSingleClick !="onMapSingleClick '';" exec !"addons\status_bar\init_statusBar.sqf"

To this:

line 20    7 allowDamage !="player allowDamage true;vehicle player allowDamage true;"  !""pto: %3 | Players: %2 | FPS: %1 ", round diag_fps, count playableUnits, EPOCH_playerCrypto, mapGridPosition player];"
 
line 23    7 onMapSingleClick !="onMapSingleClick '';"

But I'm not sure if that will fix your issue, as neither of these two lines are line 0.  If you're getting kicked for scripts line 0, then you should look at line 1 of the scripts.txt file, and I don't believe there are any additions needed to line 1 for this status bar.  

 

The !"addons\status_bar\init_statusBar.sqf" needs to be added to the "exec" line of your scripts.txt, which depending on what Antihack you're using, it could be on a different line number.  Check scripts.txt for the line that begins with exec exemptions and add !"addons\status_bar\init_statusBar.sqf" to it.

Link to comment
Share on other sites

UPDATE - v1.3 Released via Github

 

Due to multiple requests I have added a feature to the status bar where players can select a different size status bar based on their video settings' Interface Size.  This is done via an addAction menu that prompts players when they first load into the world.  If they accidentally select the wrong size they will have the option to make another choice, also via the same addAction menu.  This applies to both players and admins, EXCEPT for the bar with world space coords, which is still limited to a Small Interface Size only.  

 

To update:  Remove the current 'status_bar' folder from your mission file and replace it with the 'status_bar' folder you will download from Github.  No other changes should be needed.  BE filters are the same.  

Link to comment
Share on other sites

Update 1.35 released

 

 

Status bar will keep a consistent size and position regardless of Interface size.  Player selection of status bar size is no longer needed.

 

 

To update:  Remove the 'status_bar' folder from your mission and replace it with the one from Github.  No other changes are needed.

 

Thanks goes to Halv for pointing me in the right direction!  :)  

Link to comment
Share on other sites

Very good looking status bar for certain, but I'm seeing a problem when using it.

 

The issue I'm seeing is that if I choose a size from the menu and it doesn't look right and I go back into the menu and choose another size, I get two status bars at the bottom, overlapping each other.

If I choose all five sizes, I get all five status bars overlapping each other at the bottom of my screen. Shouldn't the script remove the current bar and replace it with the new one being chosen?

I'm not a scripter by any stretch of the imagination, so I have no idea how this could be accomplished. Perhaps it is already in the script to do such a thing and it just isn't working properly?  :ph34r:

Link to comment
Share on other sites

Big Thanks Darth_Rogue - for your work! I hope you know that people like you are, we must be praised (NoHomo) - this also applies to Halv, Zupa, DirtySanchez, Suppe and all script-genius here too.

 

What do u think about, that the statusbar is on the edge, like altis life except gridref, pos etc.

Link to comment
Share on other sites

Very good looking status bar for certain, but I'm seeing a problem when using it.

The issue I'm seeing is that if I choose a size from the menu and it doesn't look right and I go back into the menu and choose another size, I get two status bars at the bottom, overlapping each other.

If I choose all five sizes, I get all five status bars overlapping each other at the bottom of my screen. Shouldn't the script remove the current bar and replace it with the new one being chosen?

I'm not a scripter by any stretch of the imagination, so I have no idea how this could be accomplished. Perhaps it is already in the script to do such a thing and it just isn't working properly? :ph34r:

You're using the 1.3 version. Please update to 1.35 and that problem will go away.

Link to comment
Share on other sites

Big Thanks Darth_Rogue - for your work! I hope you know that people like you are, we must be praised (NoHomo) - this also applies to Halv, Zupa, DirtySanchez, Suppe and all script-genius here too.

What do u think about, that the statusbar is on the edge, like altis life except gridref, pos etc.

Thanks! I'm happy to give back to the community that's helped me so much. :)

This hasn't been tested with any mods other than Epoch. It's likely that other mods may use differing display settings that could affect the positioning. If you play with the x and y and W settings in the hpp file you should be able to get it going. Be prepared for a lot of trial and error though. Making small adjustments at a time helps.

Link to comment
Share on other sites

You're using the 1.3 version. Please update to 1.35 and that problem will go away.

 

Strange. I downloaded the files from github less than 12 hours ago. Looks like you were already close to uploading 1.35.

I have it updated and it works like a charm. But, of course I'm sure you already knew that.  :)

Link to comment
Share on other sites

1.46 broke my status bar :o

Just got done with initial tests after the 1.46 update and so far so good.

I am using the last status bar as I have not had the time to update to the new one.

I will hopefully get to some testing this evening after a few internal updates are done.

Link to comment
Share on other sites

Did you check your client RPT too, Richie?  This script usually doesn't ever show anything in the server RPT.  

 

You could try adding a diag_log message to the bottom of the init and player/admin script files to see if it's loading or not.  

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