Advertisement
Guest User

Untitled

a guest
Oct 21st, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.38 KB | None | 0 0
  1. /////////////////////////////////////////////////////////////////////
  2. /// NEW CODE TO OVERIDE DEFAULT BUTTONS /////////////////////////////
  3. /////////////////////////////////////////////////////////////////////
  4. /// This will make scarCODE Server Info Menu the default ////////////
  5. /////////////////////////////////////////////////////////////////////
  6. /// credit to https://www.exilemod.com/profile/78056-wurstkette/ ////
  7. /// for the guidance he provided in ////
  8. /// https://www.exilemod.com/topic/25544-xm8-edit-server-rules/ /////
  9. /////////////////////////////////////////////////////////////////////
  10.  
  11. /*
  12. You can now set what buuton you would like to replace
  13. 1 = server info button
  14. 2 = Bounties Button
  15. 3 = Clan Button
  16. */
  17. _btnToUse = 1;
  18.  
  19. // Will use the logo from ExAd server info because it is cool :)
  20. _AppsLogo = "ExadClient\XM8\Apps\Info\Icon_SI.paa";
  21.  
  22. if(_btnToUse == 1)then{
  23. // clear server info button text
  24. //Will set the text on the server info button to "Server Info Menu"
  25. _serverInfo = _display displayCtrl 1107;
  26. _serverInfo ctrlSetText "";
  27. _serverInfo ctrlSetFade 1;
  28. _serverInfo ctrlCommit 0;
  29.  
  30. _newIcon = _display ctrlCreate ["RscPicture", 9897, _display displayCtrl 4040];
  31. _newIcon ctrlSetPosition [(24.25 - 3) * (0.025), (15.5 - 2) * (0.04), 2.75 * (0.04), 2.75 * (0.04)];
  32. _newIcon ctrlCommit 0.01;
  33. _newIcon ctrlSetText _AppsLogo;
  34.  
  35. _newControl = _display ctrlCreate ["RscExileXM8AppButton1x1", 9898, _display displayCtrl 4040];
  36. _newControl ctrlSetPosition [(23.5 - 3) * (0.025), (15 - 2) * (0.04)];
  37. _newControl ctrlCommit 0.01;
  38. _newControl ctrlSetEventHandler ["ButtonClick", "createDialog 'RscDisplayServerInfoMenu'"];
  39. _newControl ctrlSetStructuredText (parseText (format ["Server Info Menu"]));
  40. };
  41.  
  42. if(_btnToUse == 2)then{
  43. // clear Bounties button text
  44. //Will set the text on the Bounties button to "XM8 Apps"
  45. _serverInfo = _display displayCtrl 1103;
  46. _serverInfo ctrlSetText "";
  47. _serverInfo ctrlSetFade 1;
  48. _serverInfo ctrlCommit 0;
  49.  
  50. _newIcon = _display ctrlCreate ["RscPicture", 9897, _display displayCtrl 4040];
  51. _newIcon ctrlSetPosition [(17.9 - 3) * (0.025), (15.5 - 2) * (0.04), 2.75 * (0.04), 2.75 * (0.04)];
  52. _newIcon ctrlCommit 0.01;
  53. _newIcon ctrlSetText _AppsLogo;
  54.  
  55. _newControl = _display ctrlCreate ["RscExileXM8AppButton1x1", 9898, _display displayCtrl 4040];
  56. _newControl ctrlSetPosition [(17 - 3) * (0.025), (15 - 2) * (0.04)];
  57. _newControl ctrlCommit 0.01;
  58. _newControl ctrlSetEventHandler ["ButtonClick", "execVM'xm8Apps\XM8Apps_Init.sqf';"];
  59. _newControl ctrlSetStructuredText (parseText (format ["XM8 Apps"]));
  60. };
  61.  
  62. if(_btnToUse == 3)then{
  63. // clear Clan button text
  64. //Will set the text on the Clan button to "XM8 Apps"
  65. _serverInfo = _display displayCtrl 1105;
  66. _serverInfo ctrlSetText "";
  67. _serverInfo ctrlSetFade 1;
  68. _serverInfo ctrlCommit 0;
  69.  
  70. _newIcon = _display ctrlCreate ["RscPicture", 9897, _display displayCtrl 4040];
  71. _newIcon ctrlSetPosition [(30.8 - 3) * (0.025), (4.5 - 2) * (0.04), 2.75 * (0.04), 2.75 * (0.04)];
  72. _newIcon ctrlCommit 0.01;
  73. _newIcon ctrlSetText _AppsLogo;
  74.  
  75. _newControl = _display ctrlCreate ["RscExileXM8AppButton1x1", 9898, _display displayCtrl 4040];
  76. _newControl ctrlSetPosition [(30 - 3) * (0.025), (4 - 2) * (0.04)];
  77. _newControl ctrlCommit 0.01;
  78. _newControl ctrlSetEventHandler ["ButtonClick", "execVM'xm8Apps\XM8Apps_Init.sqf';"];
  79. _newControl ctrlSetStructuredText (parseText (format ["XM8 Apps"]));
  80. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement