Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////////////////////////////////////////////
- /// NEW CODE TO OVERIDE DEFAULT BUTTONS /////////////////////////////
- /////////////////////////////////////////////////////////////////////
- /// This will make scarCODE Server Info Menu the default ////////////
- /////////////////////////////////////////////////////////////////////
- /// credit to https://www.exilemod.com/profile/78056-wurstkette/ ////
- /// for the guidance he provided in ////
- /// https://www.exilemod.com/topic/25544-xm8-edit-server-rules/ /////
- /////////////////////////////////////////////////////////////////////
- /*
- You can now set what buuton you would like to replace
- 1 = server info button
- 2 = Bounties Button
- 3 = Clan Button
- */
- _btnToUse = 1;
- // Will use the logo from ExAd server info because it is cool :)
- _AppsLogo = "ExadClient\XM8\Apps\Info\Icon_SI.paa";
- if(_btnToUse == 1)then{
- // clear server info button text
- //Will set the text on the server info button to "Server Info Menu"
- _serverInfo = _display displayCtrl 1107;
- _serverInfo ctrlSetText "";
- _serverInfo ctrlSetFade 1;
- _serverInfo ctrlCommit 0;
- _newIcon = _display ctrlCreate ["RscPicture", 9897, _display displayCtrl 4040];
- _newIcon ctrlSetPosition [(24.25 - 3) * (0.025), (15.5 - 2) * (0.04), 2.75 * (0.04), 2.75 * (0.04)];
- _newIcon ctrlCommit 0.01;
- _newIcon ctrlSetText _AppsLogo;
- _newControl = _display ctrlCreate ["RscExileXM8AppButton1x1", 9898, _display displayCtrl 4040];
- _newControl ctrlSetPosition [(23.5 - 3) * (0.025), (15 - 2) * (0.04)];
- _newControl ctrlCommit 0.01;
- _newControl ctrlSetEventHandler ["ButtonClick", "createDialog 'RscDisplayServerInfoMenu'"];
- _newControl ctrlSetStructuredText (parseText (format ["Server Info Menu"]));
- };
- if(_btnToUse == 2)then{
- // clear Bounties button text
- //Will set the text on the Bounties button to "XM8 Apps"
- _serverInfo = _display displayCtrl 1103;
- _serverInfo ctrlSetText "";
- _serverInfo ctrlSetFade 1;
- _serverInfo ctrlCommit 0;
- _newIcon = _display ctrlCreate ["RscPicture", 9897, _display displayCtrl 4040];
- _newIcon ctrlSetPosition [(17.9 - 3) * (0.025), (15.5 - 2) * (0.04), 2.75 * (0.04), 2.75 * (0.04)];
- _newIcon ctrlCommit 0.01;
- _newIcon ctrlSetText _AppsLogo;
- _newControl = _display ctrlCreate ["RscExileXM8AppButton1x1", 9898, _display displayCtrl 4040];
- _newControl ctrlSetPosition [(17 - 3) * (0.025), (15 - 2) * (0.04)];
- _newControl ctrlCommit 0.01;
- _newControl ctrlSetEventHandler ["ButtonClick", "execVM'xm8Apps\XM8Apps_Init.sqf';"];
- _newControl ctrlSetStructuredText (parseText (format ["XM8 Apps"]));
- };
- if(_btnToUse == 3)then{
- // clear Clan button text
- //Will set the text on the Clan button to "XM8 Apps"
- _serverInfo = _display displayCtrl 1105;
- _serverInfo ctrlSetText "";
- _serverInfo ctrlSetFade 1;
- _serverInfo ctrlCommit 0;
- _newIcon = _display ctrlCreate ["RscPicture", 9897, _display displayCtrl 4040];
- _newIcon ctrlSetPosition [(30.8 - 3) * (0.025), (4.5 - 2) * (0.04), 2.75 * (0.04), 2.75 * (0.04)];
- _newIcon ctrlCommit 0.01;
- _newIcon ctrlSetText _AppsLogo;
- _newControl = _display ctrlCreate ["RscExileXM8AppButton1x1", 9898, _display displayCtrl 4040];
- _newControl ctrlSetPosition [(30 - 3) * (0.025), (4 - 2) * (0.04)];
- _newControl ctrlCommit 0.01;
- _newControl ctrlSetEventHandler ["ButtonClick", "execVM'xm8Apps\XM8Apps_Init.sqf';"];
- _newControl ctrlSetStructuredText (parseText (format ["XM8 Apps"]));
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement