Jump to content
  • 0

Creating Commandingmenu


ruubje11

Question

Hey all,

 

I know my way around scripts and am able to set up a server but lately I've been trying to write a little bit myself. I start with little things and tried to make a small commandingmenu, but it seems not to be running. Was just wondering if you guys see anything that I did wrong?

 

I execute this and it just doesn't show anything. I added all the menu's to exception of the AHconfig

/* Necessary??? */ if (isNil "Ruubs") then {Ruubs = true;};

// Shortcuts 

_pathtoevents = "addons\admin\events\";
_pathtodonat = "addons\admin\donations\";
_execute1 = 'player execVM "'_pathtoevents+'%1"';
_execute2 = 'player execVM "'_pathtodonat+'%1"';

// Main Menu Ruubs

Ruubmenu = 
	[
			["Ruubs",true],
					["Events", [2], "#USER:EventMenu", -5, [["expression", ""]], "1", "1"],
					["Donations", [3], "#USER:DonatMenu", -5, [["expression", ""]], "1", "1"],
				["", [-1], "", -5, [["expression", ""]], "1", "0"],
			["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
	];


// Secundary Menu Event & Donate	
	
Eventmenu = 
	[
			["Events",true],
					["Catch Ural", [2], "#USER:UralMenu", -5, [["expression", ""]], "1", "1"],
					["Reserved", [3], "#USER:Ruubmenu", -5, [["expression", ""]], "1", "1"],
				["", [-1], "", -5, [["expression", ""]], "1", "0"],
			["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
	];
	
Donatmenu = 
	[
			["Donation",true],
					["Cinder Block Base", [2], "", -5, [["expression", '["ural"] format[_execute2,"donkit.sqf"]']], "1", "1"],
					["Mini Cinder Block Base", [3], "", -5, [["expression", '["ural"] format[_execute2,"donkit.sqf"]']], "1", "1"],
				["", [-1], "", -5, [["expression", ""]], "1", "0"],
			["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
	];

// Tertiary Specifics	
	
UralMenu = 
[
			["Ural",true],
					["Ural Weapons", [2], "", -5, [["expression", '["weapon"] format[_execute1,"EventUral.sqf"]']], "1", "1"],
					["Ural Gold", [3], "", -5, [["expression", '["gold"] format[_execute1,"EventUral.sqf"]']], "1", "1"],
					["Ural Build", [4], "", -5, [["expression", '["build"] format[_execute1,"EventUral.sqf"]']], "1", "1"],
					["Ural Vehicle", [5], "", -5, [["expression", '["vehicle"] format[_execute1,"EventUral.sqf"]']], "1", "1"],
					["Ural Shit", [6], "", -5, [["expression", '["shit"] format[_execute1,"EventUral.sqf"]']], "1", "1"],
				["", [-1], "", -5, [["expression", ""]], "1", "0"],
			["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];	


showCommandingMenu "#USER:Ruubmenu";
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

not done a lot with the menu system. some places to look:

https://community.bistudio.com/wiki/showCommandingMenu

also search for blue phoenix admin tools. a good example of how to use this.

you've picked a challenge as a place to start scripting :) for menu options there is also:

https://community.bistudio.com/wiki/addAction

has it's own quirks but gets the job done..

Link to comment
Share on other sites

  • 0

I based alot of it on the bluephoenix admin tools example yes! And checked the wiki about commandingmenu's.

 

I think I may have tried to do too much at once. Might start by trying to get only the first menu to work and work my way up from there!

 

Thanks man, I'm glad you responded!

Link to comment
Share on other sites

  • 0

Lol that  + actually helped! The mission appears for me now!

 

Now it is the execution of the scripts.. hmm

 

The Ural, camo, weapon, gold etc they are all calls for the different cases I have in the script.

_option = _this select 0;
switch (_option) do {

case "weapon": {

I do it that way so I don't need thousand separate sqf's ^^

 

Thanks for the help, I'm getting closer!

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
  • Advertisement
  • Discord

×
×
  • Create New...