IT07

[scarCODE] Server Info Menu

259 posts in this topic

Here is the code that determines if it pops up on load.  You can add an AND statement with a UID check if you have a specific set of users who would not see the menu anymore regardless of the setting for show at login.  This is also where you would modify to check the DB setting that you need to create if you choose to go that way instead.

 

initlocal.sqf

Spoiler
  if hasInterface then
  {
  if isMultiplayer then
  {
 

waitUntil { if ( not ( isNull ( findDisplay 46 ) ) AND ( ( typeOf player ) isEqualTo "Exile_Unit_Player" ) ) then { true } else { uiSleep 0.5; false } };

///////////////////////////////HERE (below)

  if ( getText ( missionConfigFile >> "CfgServerInfoMenu" >> "openAtLogin" ) isEqualTo "yes" ) then { createDialog "RscDisplayServerInfoMenu" };
  } else
  {
 

waitUntil { if not ( isNull ( findDisplay 46 ) ) then { true } else { uiSleep 0.5; false } };

///////////////////////////////HERE (below)

  if ( getText ( missionConfigFile >> "CfgServerInfoMenu" >> "openAtLogin" ) isEqualTo "yes" ) then { createDialog "RscDisplayServerInfoMenu" };
  };

You'll need to change it in both places to something like this

Spoiler

if ( getText ( missionConfigFile >> "CfgServerInfoMenu" >> "openAtLogin" ) isEqualTo "yes" ) AND (CHECK DB OR CHECK UID FILE SET TO SHOW) then { createDialog "RscDisplayServerInfoMenu" };

Keep in mind IT07 may want you to talk with him about how to modify this script, or do a pull(?) request.  I still need to noodle through how that works.

Edited by Knocks

Share this post


Link to post
Share on other sites
Advertisement

Hi, all!
Anybody know how to change standart button server info on 1 XM8 page to Starcode link?

I found in ExileClient_gui_xm8_slide_server_onOpen:
 

/**
 * ExileClient_gui_xm8_slide_server_onOpen
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_display", "_control"];
disableSerialization;
_display = uiNameSpace getVariable ["RscExileXM8", displayNull];
_control = _display displayCtrl 4092;
	_control htmlLoad "xm8_server_info.html";
//};

Trying to add here:
fnc = "ExileClientXM8CurrentSlide = 'apps';closeDialog 0;createDialog 'RscDisplayServerInfoMenu'";

dont give results, need your help, big brains.

Share this post


Link to post
Share on other sites
3 hours ago, [x] cit said:

Hi, all!
Anybody know how to change standart button server info on 1 XM8 page to Starcode link?

I found in ExileClient_gui_xm8_slide_server_onOpen:
 


/**
 * ExileClient_gui_xm8_slide_server_onOpen
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_display", "_control"];
disableSerialization;
_display = uiNameSpace getVariable ["RscExileXM8", displayNull];
_control = _display displayCtrl 4092;
	_control htmlLoad "xm8_server_info.html";
//};

Trying to add here:
fnc = "ExileClientXM8CurrentSlide = 'apps';closeDialog 0;createDialog 'RscDisplayServerInfoMenu'";

dont give results, need your help, big brains.

Pop https://pastebin.com/9fw52mfW into the bottom of ExileClient_gui_xm8_slide_apps_onOpen as an override.
Edit as needed

  • Like 1

Share this post


Link to post
Share on other sites

I've been playing around with this and would like to reference a variable in the content of a page. 

For example, something like this: 

content[] = {
	format ["Players killed: %1", _kills];
};

After a lot of digging I've not found a way to do this without it just outputting exactly what is written in the content.

Spoiler

SImJC6b.jpg

I assumed this would work because of this comment: 

// title AND content accept formatted text ( since update Oct5.2016 )

Apologies if this has been covered already. Would love it if someone could point me in the right direction to get variables working in the content.  

Share this post


Link to post
Share on other sites
On 10/22/2018 at 6:05 PM, Jeffry said:

Pop https://pastebin.com/9fw52mfW into the bottom of ExileClient_gui_xm8_slide_apps_onOpen as an override.
Edit as needed

Hello, where is this located?

ExileClient_gui_xm8_slide_apps_onOpen

Found it:  
Exile-Server/@exile/addons/exile_client/code/ExileClient_gui_xm8_slide_apps_onOpen.sqf

Edited by MrNeal
Updated Info

Share this post


Link to post
Share on other sites

I had a couple players cry about it being on the scroll wheel. Personally, I played thousands of hours with no issues but still removed it and added it to a custom key bind just to have one less thing for ppl to complain about. I never once accidentally clicked it. 

Share this post


Link to post
Share on other sites
On 10/28/2018 at 12:55 PM, MrNeal said:

Hello, where is this located?

ExileClient_gui_xm8_slide_apps_onOpen

Found it:  
Exile-Server/@exile/addons/exile_client/code/ExileClient_gui_xm8_slide_apps_onOpen.sqf

Did you just paste the code from Jeffry to the end of ExileClient_gui_xm8_slide_apps_onOpen?

or did you change something in ExileClient_gui_xm8_slide_server_onOpen to?

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.