Jump to content
  • 0

[If You Have Time] Rules Menu


Ree

Question

So was poping around on a few servers and came across 1 with a F1 Rules menu that i thought was great looking so i looked around and found almost 0 info so thought i post on here maybe someone with free time can make this i'd love to apply something like this on my server would be a easy way to Write down rules or Instructions in-game for players on our custom items list and not have to Refer to the website each time.

 

Here a Screenshot u push F1 and it pulls it up

w9jn92.jpg

 

As for Small part of the script i was looking around for info on it and only thing i found was info on Hacker Menu so i was thinking it was changed up from a Hacker Menu maybe not sure.

if (isnil "take1") then { take1 = 0;

if (p2SpT) then { _time = diag_tickTime;  diag_log format ['screen.sqf started, Time: %1',_time];  }; 


p2Menu1 = []; 
p2Menu2 = [];
	p2Menu2 = p2Menu2 + [""]; p2Menu1 = p2Menu1 + ["======= News =======","menu\showText.sqf","News_Header"];
startLoadingScreen [format ["Loading Menu",_nul],"RscDisplayLoadMission"];
#define GET_DISPLAY (findDisplay 155)
#define GET_CTRL(a) (GET_DISPLAY displayCtrl ##a)
#define GET_SELECTED_DATA(a) ([##a] call {_idc = _this select 0;_selection = (lbSelection GET_CTRL(_idc) select 0);if (isNil {_selection}) then {_selection = 0};(GET_CTRL(_idc) lbData _selection)})
#define KINDOF_ARRAY(a,b) [##a,##b] call {_veh = _this select 0;_types = _this select 1;_res = false; {if (_veh isKindOf _x) exitwith { _res = true };} forEach _types;_res}
#define balca_VC_vehlist_IDC = 101	
progressLoadingScreen 0.1;
	p2Menu2 = p2Menu2 + [""]; p2Menu1 = p2Menu1 + ["======= Rules =======","menu\showText.sqf","Rules_Header"]; 
	p2Menu2 = p2Menu2 + [""]; p2Menu1 = p2Menu1 + ["Global Rules","menu\showText.sqf","Rules_Global"];
	p2Menu2 = p2Menu2 + [""]; p2Menu1 = p2Menu1 + ["Donator Rules","menu\showText.sqf","Rules_Donator"];
	p2Menu2 = p2Menu2 + [""]; p2Menu1 = p2Menu1 + ["Staff Rules","menu\showText","Rules_Staff"];
	p2Menu2 = p2Menu2 + [""]; p2Menu1 = p2Menu1 + ["======= Features =======","showText.sqf","Features_Header"]; 
	p2Menu2 = p2Menu2 + [""]; p2Menu1 = p2Menu1 + ["Server Modifications","showText.sqf","Features_Mods"];
	p2Menu2 = p2Menu2 + [""]; p2Menu1 = p2Menu1 + ["Deployable Vehicles","showText.sqf","Features_Deployables"];
	p2Menu2 = p2Menu2 + [""]; p2Menu1 = p2Menu1 + ["Donator Bases","showText","Features_Bases"];
	p2Menu2 = p2Menu2 + [""]; p2Menu1 = p2Menu1 + ["Donator Loadouts","showText","Features_Loadouts"];
	p2Menu2 = p2Menu2 + [""]; p2Menu1 = p2Menu1 + ["Clan Skins","showText","Features_ClanSkins"];
	p2Menu2 = p2Menu2 + [""]; p2Menu1 = p2Menu1 + ["======= User Support =======","showText","Support_Header"]; 
	p2Menu2 = p2Menu2 + [""]; p2Menu1 = p2Menu1 + ["======= About Us =======","showText","AboutUs_Header"];
	progressLoadingScreen 0.2;
};
disableSerialization;
ctrlshow [1004,false]; 
ctrlshow [1003,false];
ctrlshow [1005,false];
ctrlshow [1012,false];
ctrlshow [102,false];
ctrlshow [103,false];
ctrlshow [116,false];
ctrlshow [121,false];
ctrlshow [125,false];
ctrlshow [126,false];
ctrlshow [127,false];
ctrlshow [117,false];
ctrlshow [118,false];
ctrlshow [128,false];
ctrlshow [106,false];
ctrlshow [107,false];
ctrlshow [101,false];
ctrlshow [1,false];
ctrlshow [2,false]; 
	ctrlSetText [1001,"       Server Information"];
	ctrlSetText [1002,"Website URL"];
	ctrlSetText [101,format["Control 101",lifeState player , side player]]; 
	ctrlSetText [103,format ["Control 103",currentTask player ]];
	ctrlSetText [102,format ["%1",worldName]];
	ctrlSetText [102,format ["ARMA 2",worldName]];
	ctrlSetText [104,"Select"];
	ctrlSetText [105,"Exit"];
	ctrlSetText [106,"Exit"];
	ctrlSetText [107,"Exit"];
	ctrlSetText [108,"              Main Menu"];
	ctrlSetText [1006,"     Selection Information"];
	_menuText = 114;
	lbAdd [_menuText, "						Menu: How To"];
	lbAdd [_menuText, "==========================================================="];
	lbAdd [_menuText, "<--- Left Click and Highlight an Option"];
	lbAdd [_menuText, "     Then Left Click ''Select''!"];	
	lbAdd [_menuText, " "];
	lbAdd [_menuText, "Press F1 to Open the Menu"];
	lbAdd [_menuText, "Press Escape to Close the Menu"];
progressLoadingScreen 0.3;
 _T = 0; 
 _P = 0;
for [{_fx=0},{_fx<=count(p2Menu1)-1},{_fx=_fx+3}] do
{
	lbadd [109,format["%1",p2Menu1 select _fx]];
	lbsetcolor[109,(lbsize 109)-1,[1,1,.766,0.8]];
	lbsetpicture [109,(lbsize 109)-1,format["%1",p2Menu2 select _P] ];
	_P = _P + 1;
};
index = lbCurSel 109;
buttonSetAction [125,"hint '125';"];
buttonSetAction [126,"hint '126';"];
buttonSetAction [127,"hint '127';"];
buttonSetAction [104,"[lbtext[109,(lbCurSel 109)],lbtext[114,(lbCurSel 114)],format['%1',p2Menu1 select ((lbCurSel 109))*3+1],format['%1',p2Menu1 select ((lbCurSel 109))*3+2]] call p2menu_showText;"];
buttonSetAction [105,"closedialog 0;"]; 
buttonSetAction [106,"closedialog 0;"]; 
buttonSetAction [107,"closedialog 0;"];
endLoadingScreen;

if (p2SpT) then { _time = diag_tickTime;  diag_log format ['screen.sqf finished, Time: %1',_time];  }; 

If anyone has time to make this fully workable and released i love you for ever !

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

I do like the idea behind this, it's something that'd be extremely useful for players and admins alike but it could pose quite a security risk. If people are running an anti-hack that blocks certain displays and dialogs, they'd have to allow this dialog. Considering this dialog is used often by hack menus it could be unwise to allow it. I think hintC is a much safer way to display server rules, even if you can't fit quite as much info on there. Putting that aside though, I do like it :)

Link to comment
Share on other sites

  • 0

I do like the idea behind this, it's something that'd be extremely useful for players and admins alike but it could pose quite a security risk. If people are running an anti-hack that blocks certain displays and dialogs, they'd have to allow this dialog. Considering this dialog is used often by hack menus it could be unwise to allow it. I think hintC is a much safer way to display server rules, even if you can't fit quite as much info on there. Putting that aside though, I do like it :)

 

Don't you have something like this already written? also seen like a admin tool

 

Could that be converted into Click and Display Text and not Spawn ect?

 

http://epochmod.com/forum/index.php?/topic/25023-hit-f10-to-show-scriptsaddons/?hl=rules#entry161414

Link to comment
Share on other sites

  • 0

I feel like sharing.

	serverRuleArray = ['']; //16 Max
	
	serverRules =
	{
		'Server Rules:' hintC serverRuleArray;
		clearhint = (findDisplay 72) displayAddEventHandler ['unload','_this spawn {hintSilent ""; (_this select 0) displayRemoveEventHandler ["unload",clearhint];};'];
	};
	
	[] spawn
	{
		disableSerialization;
		private ['_display','_button'];
		while {true} do {
			waitUntil {!isNull (findDisplay 49)};
			_display = (findDisplay 49);

			_button = _display displayCtrl 103;
			_button ctrlEnable true;
			_button ctrlSetTextColor [1,1,1,1];
			_button ctrlSetText 'Server Rules';
			_button buttonSetAction '[] spawn {waitUntil {(isNull (findDisplay 49))}; call serverRules;};';
			_button ctrlCommit 0;
			
			waitUntil {isNull (findDisplay 49)};
		};
	};

Replaces the top button on the escape menu with 'Server Rules'. Displays server rules when clicked.

Link to comment
Share on other sites

  • 0

I have seen something similar that uses the scroll wheel dialog and just executes a credits script. I imagine this is a much safer method than allowing use of F-keys and command dialog. Not 100% on this, but i imagine you could easily find any script using the scroll wheel and just install the credits script and change the scroll script's menu text and change the script to activate the credits script.

Link to comment
Share on other sites

  • 0

i can understand a scroll click credits script but if people are like me i like to take there time to read and not have to click it over and over  in-case i missed something or i wanted to get to the right rule or info

 

btw ty CordAsis, 

 

 

and for the F-keys i was more leaning on changing different https://community.bistudio.com/wiki/DIK_KeyCodes maybe one a hacker menu didn't use

Link to comment
Share on other sites

  • 0

Yeah sure you could easily add it to an addAction. I only created this the way it is because I absolutely despise the damn action menu.

 

Lol, im just talking from a noobs prospective. I actually was typing this before you replied. Or i wouldve just let it be. XD I prefer yours 10x over =]

Link to comment
Share on other sites

  • 0

I feel like sharing.

	serverRuleArray = ['']; //16 Max
	
	serverRules =
	{
		'Server Rules:' hintC serverRuleArray;
		clearhint = (findDisplay 72) displayAddEventHandler ['unload','_this spawn {hintSilent ""; (_this select 0) displayRemoveEventHandler ["unload",clearhint];};'];
	};
	
	[] spawn
	{
		disableSerialization;
		private ['_display','_button'];
		while {true} do {
			waitUntil {!isNull (findDisplay 49)};
			_display = (findDisplay 49);

			_button = _display displayCtrl 103;
			_button ctrlEnable true;
			_button ctrlSetTextColor [1,1,1,1];
			_button ctrlSetText 'Server Rules';
			_button buttonSetAction '[] spawn {waitUntil {(isNull (findDisplay 49))}; call serverRules;};';
			_button ctrlCommit 0;
			
			waitUntil {isNull (findDisplay 49)};
		};
	};

Replaces the top button on the escape menu with 'Server Rules'. Displays server rules when clicked.

 

Hey there, cant get it started.. Would you mind to write a quick tutorial or something? 

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