count jets in the playermenu

  • Offline .Lord
  • First Blood
  • ***
  • Posts: 79

count jets in the playermenu

« posted: Jun 24, 2022, 05:40 AM »
Hello, could someone help me with the command to count jets during the round in the playermenu? I have no idea how to do this.
Thanks

Re: count jets in the playermenu

« Reply #1 posted: Apr 12, 2023, 05:36 PM »
Would love to know this aswell.
NoAim has this feature on their wasteland servers and i would love a similar option, either in the playermenu or in the UI.
  • Offline h4wk
  • Geared Up
  • **
  • Posts: 27

Re: count jets in the playermenu

« Reply #2 posted: Apr 14, 2023, 10:10 AM »
simple,

script:

1. Open up the file "client\systems\playerMenu\init.sqf"

below "_rogue = _Dialog displayCtrl rogue_text;" add this

Code: [Select]
private _bluPlane = _Dialog displayCtrl blufor_plane;
private _redPlane = _Dialog displayCtrl opfor_plane;
private _indPlane = _Dialog displayCtrl guer_plane;

and at the bottom of the init.sqf add this:

Code: [Select]
private _bluPlaneCount = {alive _x && side _x == west && vehicle _x isKindOf "Plane" && currentPilot (vehicle _x) isEqualTo _x && !(vehicle _x isKindOf "C_Plane_Civil_01_F" || vehicle _x isKindOf "C_Plane_Civil_01_racing_F")} count allUnits;
_bluPlane ctrlSetText format["%1", _bluPlaneCount];

private _redPlaneCount = {alive _x && side _x == east && vehicle _x isKindOf "Plane" && currentPilot (vehicle _x) isEqualTo _x && !(vehicle _x isKindOf "C_Plane_Civil_01_F" || vehicle _x isKindOf "C_Plane_Civil_01_racing_F")} count allUnits;
_redPlane ctrlSetText format["%1", _redPlaneCount];

private _indPlaneCount = {alive _x && side _x == independent && vehicle _x isKindOf "Plane" && currentPilot (vehicle _x) isEqualTo _x && !(vehicle _x isKindOf "C_Plane_Civil_01_F" || vehicle _x isKindOf "C_Plane_Civil_01_racing_F")} count allUnits;
_indPlane ctrlSetText format["%1", _indPlaneCount];


2. open up the client\systems\playerMenu\dialog\player_sys.sqf and add at the bottom:
Code: [Select]
#define blufor_plane 2047
#define opfor_plane 2048
#define guer_plane 2049

dialog:

3. open up the file client\systems\playerMenu\dialog\player_settings.hpp and add these lines at the bottom before the last 2 "};"
Code: [Select]
class bluforPlane : RscText {
idc = blufor_plane;
size = 0.030;
// text = "0";
colorText[] = {1,1,1,1};
colorLink[] = {0,0.34,0.59,1};
colorLinkActive[] = {0,0.34,0.59,0.1};
x = 0.406; y = 0.491;
w = 0.225; h = 0.033 * safezoneH;
};

class bluforPlaneIconBk : RscText {
idc = -1;
colorBackground[] = {0, 0.588, 1, 0.8};
colorPicture[] = {1,1,1,1};
            x = 0.368;
            y = 0.494;
            w = (0.9 / 25);
            h = (1.5 / 25);
};

class bluforPlaneIcon : RscPicture {
idc = -1;
colorBackground[] = {0.788, 0, 0, 0.8};
colorPicture[] = {1, 1, 1, 1};
            text = "A3\Air_F_Jets\Plane_Fighter_01\Data\UI\Fighter01_icon_ca.paa";
            x = 0.37;
            y = 0.502;
w = (0.8 / 25);
            h = (1.05 / 25);
};

class opforPlane : RscText {
idc = opfor_plane;
size = 0.030;
// text = "0";
colorText[] = {1,1,1,1};
colorLink[] = {0,0.34,0.59,1};
colorLinkActive[] = {0,0.34,0.59,0.1};
x = 0.482; y = 0.491;
w = 0.225; h = 0.033 * safezoneH;
};

class opforPlaneIconBk : RscText {
idc = -1;
colorBackground[] = {0.788, 0, 0, 0.8};
colorPicture[] = {1,1,1,1};
            x = 0.444;
            y = 0.494;
            w = (0.9 / 25);
            h = (1.5 / 25);
};

class opforPlaneIcon : RscPicture {
idc = -1;
colorBackground[] = {0.788, 0, 0, 0.8};
colorPicture[] = {1, 1, 1, 1};
            text = "A3\Air_F_Jets\Plane_Fighter_01\Data\UI\Fighter01_icon_ca.paa";
            x = 0.446;
            y = 0.502;
            w = (0.8 / 25);
            h = (1.05 / 25);
};

class guerPlane : RscText {
idc = guer_plane;
size = 0.030;
// text = "0";
colorText[] = {1,1,1,1};
colorLink[] = {0,0.34,0.59,1};
colorLinkActive[] = {0,0.34,0.59,0.1};
x = 0.558; y = 0.491;
w = 0.225; h = 0.033 * safezoneH;
};

class guerPlaneIconBk : RscText {
idc = -1;
colorBackground[] = {0.118, 1, 0, 0.8};
colorPicture[] = {1,1,1,1};
            x = 0.52;
            y = 0.494;
            w = (0.9 / 25);
            h = (1.5 / 25);
};

class guerPlaneIcon : RscPicture {
idc = -1;
colorBackground[] = {0.118, 0.69, 0.043, 0.8};
colorPicture[] = {1,1,1,1};
            text = "A3\Air_F_Jets\Plane_Fighter_01\Data\UI\Fighter01_icon_ca.paa";
            x = 0.522;
            y = 0.502;
            w = (0.8 / 25);
            h = (1.05 / 25);
};

this should work.

Re: count jets in the playermenu

« Reply #3 posted: Apr 14, 2023, 03:57 PM »
Thanks a thousand times but what do i do with this code?
I have zero knowledge of coding/scripting. I'm completely new at this.
Do i create a new file with these lines or do i add this to a existing one?
Greetings.
  • Offline h4wk
  • Geared Up
  • **
  • Posts: 27

Re: count jets in the playermenu

« Reply #4 posted: Apr 18, 2023, 06:47 PM »
Thanks a thousand times but what do i do with this code?
I have zero knowledge of coding/scripting. I'm completely new at this.
Do i create a new file with these lines or do i add this to a existing one?
Greetings.

i've updated my post, check it again.

Re: count jets in the playermenu

« Reply #5 posted: Apr 19, 2023, 12:34 AM »
i've updated my post, check it again.

Thanks alot. Think this will be very helpfull.