this is my new mod/addon wich I want to present to the community .
Well basicly its just a concept Im working on right now.
menu works via the F key at the moment.
firemodeselection and grendade selection wil be applied also later.
But right now im on a point where i dont now how to handle some problems with the scripting
So i could need some help from the community on this.
i want that the different symbols only be displayed if the gun or item is in the players load out.
also it would be cool to get some feedback and ideas from you on this.
I,ve a problem with the dialog at the moment.
Im trying to let the weaponsymbols only show up, if the weapon is realy in the soldiers inventory.
so that the launcher symbol only shows up if the solder has a launcher!
i know it has somthing to to with ctrlShow.
but i dont know how to use this in a script.
init.sqf Spoiler:
disableSerialization;
waitUntil {(not (isNull player)) and (alive player)};
sleep 0.2;
private['_handled'];
_handled = false;
switch (_this select 1) do
{
//F key
case 33:
{
player execVM "comR.sqf",closeDialog 0;
_handled = true;
};
};
_handled;
comR.sqf Spoiler:
_ok=createDialog "comR";
class comR
{
idd = 3000;
movingEnable = 0;
controlsBackground[] = {};
name = "myMenu1";
objects[] = {};
controls[] = {Control_0,Control_1,Control_2,Control_3,Control_4 };
class Control_0 : Base_Activetext
{
style = ST_PICTURE;
x = 0.019;
y = 0.020;
w = 0.961;
h = 0.960;
colorText[] = {0.000,0.000,0.000,1.000};
colorBackground[] = {1.000,1.000,1.000,0.000};
sizeEx = TextSize_normal;
};
class Control_1 : Base_Activetext
{
idc= 1;
style = ST_PICTURE;
action = player execVM "rifle.sqf";
text = hud\rifle.paa;
x = 0.053;
y = 0.100;
w = 0.311;
h = 0.175;
colorText[] = {1.000,1.000,1.000,0.000};
colorBackground[] = {1.000,1.000,1.000,0.000};
sizeEx = TextSize_normal;
};
class Control_2 : Base_Activetext
{
idc = 2;
style = ST_PICTURE;
action = player execVM "";
x = 0.053;
y = 0.295;
w = 0.311;
h = 0.175;
colorText[] = {1.000,1.000,1.000,0.000};
colorBackground[] = {1.000,1.000,1.000,0.000};
sizeEx = TextSize_normal;
};
class Control_3 : Base_Activetext
{
idc = 3;
style = ST_PICTURE;
action = player execVM "launcher.sqf";
text = hud\launcher.paa;
x = 0.382;
y = 0.295;
w = 0.311;
h = 0.175;
colorText[] = {1.000,1.000,1.000,0.000};
colorBackground[] = {1.000,1.000,1.000,0.000};
sizeEx = TextSize_normal;
};
class Control_4 : Base_Activetext
{
idc = 45561;
style = ST_PICTURE;
action = player execVM "pistol.sqf";
text= hud\pistole.paa;
x = 0.382;
y = 0.100;
w = 0.270;
h = 0.175;
colorText[] = {0.000,0.000,0.000,1.000};
colorBackground[] = {1.000,1.000,1.000,0.000};
sizeEx = TextSize_normal;
};
};
I found a script in the forum for handgun scanning and get it to work.
now i have to get it work for all the other itmes like launchers, grenades ect.
Spoiler:
createDialog "comR";
_unit = player;
// Function for pistol data - by Spooner
isPistol =
{
private ["_isPistol","_unknownConfig","_unknownWeaponClass" ,"_pistolConfig"];
_unknownWeaponClass = _this select 0;
i get it to work that the pistol symbol is only shown if the player is carrying one.
My plan ist to get it work with all of the weapons but i dont know how to do that exactly.
So if somebody knows how to check the player for primaryweapon or secondaryweapon it would be a great help.
I've searched already in the forum but everything I tried didnt work.
if (primaryWeapon == "") then {ctrlShow [45561, false]} else {ctrlShow [45561, true]}; ??????????