Editing a action menu weapon spawn list

Posts 113 of 13 · Page 1 of 1
Editing a action menu weapon spawn list
Code:
weapons = [];
kits = [];

_text = "player addWeapon '%1'; _mags = getArray(configfile >> 'cfgWeapons' >> '%1' >> 'magazines'); _mag = _mags select 0; player addMagazine _mag; player selectWeapon '%1'; reload player;";

weapons =
[
	["", true],
	["KITS", [2], "#USER:kits", -5, [["expression", ""]], "1", "1"],
	["", [-1], "", -5, [["expression", ""]], "1", "0"],
	["G17", [3], "", -5, [["expression", format[_text, "glock17_EP1"]]], "1", "1"],
	["M9SD", [4], "", -5, [["expression", format[_text, "M9SD"]]], "1", "1"],
	["Lee Enfield", [5], "", -5, [["expression", format[_text, "LeeEnfield"]]], "1", "1"],
	["M4A3 CCO", [6], "", -5, [["expression", format[_text, "M4A3_CCO_EP1"]]], "1", "1"],
	["L85A2 AWS", [7], "", -5, [["expression", format[_text, "BAF_L85A2_RIS_CWS"]]], "1", "1"],
	["SVD Camo", [8], "", -5, [["expression", format[_text, "SVD_CAMO"]]], "1", "1"],
	["AS50", [9], "", -5, [["expression", format[_text, "BAF_AS50_scoped"]]], "1", "1"],
	["AS50 TWS", [10], "", -5, [["expression", format[_text, "BAF_AS50_TWS"]]], "1", "1"],
	["M67 Frag Grenade", [11], "", -5, [["expression", "player addMagazine 'HandGrenade_West';"]], "1", "1"],
	["Satchel Charges", [12], "", -5, [["expression", "player addMagazine 'PipeBomb';"]], "1", "1"]
];

kits =
[
	["", true],
	["KITS", [-1], "", -5, [["expression", ""]], "1", "0"],
	["", [-1], "", -5, [["expression", ""]], "1", "0"],
	["Main Kit", [2], "", -5, [["expression", "execVM 'Scripts\Action_Scripts\kits\main_kit.sqf';"]], "1", "1"],
	["Rifle Kit", [3], "", -5, [["expression", "execVM 'Scripts\Action_Scripts\kits\rifle_kit.sqf';"]], "1", "1"],
	["Sniper Kit", [4], "", -5, [["expression", "execVM 'Scripts\Action_Scripts\kits\sniper_kit.sqf';"]], "1", "1"],
	["Toolbelt Kit", [5], "", -5, [["expression", "execVM 'Scripts\Action_Scripts\kits\tool_kit.sqf';"]], "1", "1"]
];

showCommandingMenu "#USER:weapons";
This is what it currently is. I want to delete all the "Kits" and change the weapons. Should i just re-write the weapon names? For example: i want to delete the AS50 TWS and replace it with a MK48 Mod 0, what are the changes?
try replacing BAF_AS50_TWS with Mk_48_DES_EP1

99% sure that should work
Quote Originally Posted by svtfan View Post
try replacing BAF_AS50_TWS with Mk_48_DES_EP1

99% sure that should work
That MK48 is the one that is detected by being a hacked one, because it replaces your backpack.

Here's what i changed so far, im afraid i didnt delete any usefull things.
Code:
weapons = [];
kits = [];

_text = "player addWeapon '%1'; _mags = getArray(configfile >> 'cfgWeapons' >> '%1' >> 'magazines'); _mag = _mags select 0; player addMagazine _mag; player selectWeapon '%1'; reload player;";

weapons =
[
	["", true],
	["KITS", [2], "#USER:kits", -5, [["expression", ""]], "1", "1"],
	["", [-1], "", -5, [["expression", ""]], "1", "0"],
	["G17", [3], "", -5, [["expression", format[_text, "glock17_EP1"]]], "1", "1"],
	["M9SD", [4], "", -5, [["expression", format[_text, "M9SD"]]], "1", "1"],
	["MK48 Mod 0", [5], "", -5, [["expression", format[_text, "MK_48_DZ"]]], "1", "1"],
	["G36A Camo", [6], "", -5, [["expression", format[_text, "g36a_camo"]]], "1", "1"],
	["L85A2 Holo", [7], "", -5, [["expression", format[_text, "BAF_L85A2_RIS_Holo"]]], "1", "1"],
	["M40A3", [8], "", -5, [["expression", format[_text, "m40a3"]]], "1", "1"],
	["M107", [9], "", -5, [["expression", format[_text, "M107_DZ"]]], "1", "1"],
	];

kits =
[
	["", true],
	["KITS", [-1], "", -5, [["expression", ""]], "1", "0"],
	["", [-1], "", -5, [["expression", ""]], "1", "0"],
	["Main Kit", [2], "", -5, [["expression", "execVM 'Scripts\Action_Scripts\kits\main_kit.sqf';"]], "1", "1"],
	["Rifle Kit", [3], "", -5, [["expression", "execVM 'Scripts\Action_Scripts\kits\rifle_kit.sqf';"]], "1", "1"],
	["Sniper Kit", [4], "", -5, [["expression", "execVM 'Scripts\Action_Scripts\kits\sniper_kit.sqf';"]], "1", "1"],
	["Toolbelt Kit", [5], "", -5, [["expression", "execVM 'Scripts\Action_Scripts\kits\tool_kit.sqf';"]], "1", "1"]
];

showCommandingMenu "#USER:weapons";
Quote Originally Posted by JackKellar View Post
That MK48 is the one that is detected by being a hacked one, because it replaces your backpack.

Here's what i changed so far, im afraid i didnt delete any usefull things.
Code:
weapons = [];
kits = [];

_text = "player addWeapon '%1'; _mags = getArray(configfile >> 'cfgWeapons' >> '%1' >> 'magazines'); _mag = _mags select 0; player addMagazine _mag; player selectWeapon '%1'; reload player;";

weapons =
[
	["", true],
	["KITS", [2], "#USER:kits", -5, [["expression", ""]], "1", "1"],
	["", [-1], "", -5, [["expression", ""]], "1", "0"],
	["G17", [3], "", -5, [["expression", format[_text, "glock17_EP1"]]], "1", "1"],
	["M9SD", [4], "", -5, [["expression", format[_text, "M9SD"]]], "1", "1"],
	["MK48 Mod 0", [5], "", -5, [["expression", format[_text, "MK_48_DZ"]]], "1", "1"],
	["G36A Camo", [6], "", -5, [["expression", format[_text, "g36a_camo"]]], "1", "1"],
	["L85A2 Holo", [7], "", -5, [["expression", format[_text, "BAF_L85A2_RIS_Holo"]]], "1", "1"],
	["M40A3", [8], "", -5, [["expression", format[_text, "m40a3"]]], "1", "1"],
	["M107", [9], "", -5, [["expression", format[_text, "M107_DZ"]]], "1", "1"],
	];

kits =
[
	["", true],
	["KITS", [-1], "", -5, [["expression", ""]], "1", "0"],
	["", [-1], "", -5, [["expression", ""]], "1", "0"],
	["Main Kit", [2], "", -5, [["expression", "execVM 'Scripts\Action_Scripts\kits\main_kit.sqf';"]], "1", "1"],
	["Rifle Kit", [3], "", -5, [["expression", "execVM 'Scripts\Action_Scripts\kits\rifle_kit.sqf';"]], "1", "1"],
	["Sniper Kit", [4], "", -5, [["expression", "execVM 'Scripts\Action_Scripts\kits\sniper_kit.sqf';"]], "1", "1"],
	["Toolbelt Kit", [5], "", -5, [["expression", "execVM 'Scripts\Action_Scripts\kits\tool_kit.sqf';"]], "1", "1"]
];

showCommandingMenu "#USER:weapons";
ya your right. my bad man

what you have there looks right. try it out
Quote Originally Posted by svtfan View Post
ya your right. my bad man

what you have there looks right. try it out
Just a small question: what is the difference between what i write in the first section (normal name) and what i write in the second section? (classname)
if i type something wrong in the normal name it is affected i presume
Quote Originally Posted by JackKellar View Post
Just a small question: what is the difference between what i write in the first section (normal name) and what i write in the second section? (classname)
if i type something wrong in the normal name it is affected i presume
The "name" is the text that you read when you look at it. The classname is what the code above it (the part that starts with "_text =") does with the name.

You could name it "Buttsex" and have it spawn entrenching tools, it really doesn't change anything.
thats just the name of what is displayed. im sure you can call them whatever but the code to spawn the weapon has to be perfect
Quote Originally Posted by svtfan View Post
thats just the name of what is displayed. im sure you can call them whatever but the code to spawn the weapon has to be perfect
VA just got down, i'll come back here and notify if it worked correctly, thanks!
no problem

VA is down? damn


well everyone is saying its down but mine is working fine? wonder wtf is going on
Quote Originally Posted by svtfan View Post
no problem

VA is down? damn


well everyone is saying its down but mine is working fine? wonder wtf is going on
The action menu is okay but the weapon list wont show up after i select it, what could be the problem?
Quote Originally Posted by JackKellar View Post
The action menu is okay but the weapon list wont show up after i select it, what could be the problem?
I cannot see anything wrong with it. but im pretty stoned atm and its late

I will try and run it asap and see whats up if you cant figure it out by then
i really cant figure why its not working, im looking back and forth into the original and the one i modified and i cant see what's wrong
#bump

i broke the code down and checked everything, still cant figure it out lol
Posts 113 of 13 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?