Advertisement
Guest User

Untitled

a guest
May 5th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.15 KB | None | 0 0
  1. /*
  2. Info page script made by Shix http://www.exilemod.com/profile/4566-shix/
  3. Allow admins to display any info they would like to players
  4. Made for XM8 Apps http://www.exilemod.com/topic/9040-updated-xm8-apps/
  5. */
  6. /////////////////////
  7. //CONFIG
  8. ////////////////////
  9. /*
  10. Set what text you want on each line. I do not suggest going more than 63 characters per line
  11. these are all common colors found in Exile and can be seen here http://www.exilemod.com/topic/8879-exilemod-colors/
  12. color key
  13. 1 = Red
  14. 2 = Pink
  15. 3 = Grey
  16. 4 = White
  17. 5 = Dark Blue
  18. 6 = Dark Grey
  19. 7 = Green
  20. 8 = Yellow
  21. 9 = Light Blue
  22. */
  23. _TextColor = 9;
  24.  
  25. _line1Text = "---- ADMINS ----";
  26. _line2Text = "Metalman10";
  27. _line3Text = "Jlang";
  28. _line4Text = "TankTitties";
  29. _line5Text = "Cheeky";
  30. _line6Text = "Best way to contact a admin is thru TS:wastelandgrounds.us.to";
  31. _line7Text = "---------------------------------------------------------------";
  32. _line8Text = "FAQ";
  33. _line9Text = "When does server restart?;
  34. _line10Text = "A: Every 3 hours";
  35. _line11Text = "How do i get a base build kit?";
  36. _line12Text = "A: Simply ask a admin in chat";
  37. _line13Text = "---------------------------------------------------------------";
  38. /////////////////////
  39. //CONFIG
  40. ////////////////////
  41.  
  42. disableSerialization;
  43. _display = uiNameSpace getVariable ["RscExileXM8", displayNull];
  44.  
  45. //set XM8 title
  46. (_display displayCtrl 4004) ctrlSetStructuredText (parseText (format ["<t align='center' font='RobotoMedium'>Info</t>"]));
  47.  
  48. //Hides all xm8 apps controlls then deletes them for a smooth transition
  49. _xm8Controlls = [991,881,992,882,993,883,994,884,995,885,996,886,997,887,998,888,999,889,9910,8810,9911,8811,9912,8812];
  50. {
  51. _fade = _display displayCtrl _x;
  52. _fade ctrlSetFade 1;
  53. _fade ctrlCommit 0.5;
  54. } forEach _xm8Controlls;
  55. {
  56. ctrlDelete ((findDisplay 24015) displayCtrl _x);
  57. } forEach _xm8Controlls;
  58. uiSleep 0.2;
  59.  
  60. //Created a structured text box
  61. _StructuredTextBox = _display ctrlCreate ["RscStructuredText", 1120];
  62. _StructuredTextBox ctrlSetPosition [(7 - 3) * (0.025), (6 - 2) * (0.04),(0.8),(0.54)];
  63. _StructuredTextBox ctrlCommit 0;
  64. _StructuredTextBox ctrlSetBackgroundColor [1,1,1,0.05];
  65. _StructuredTextBox ctrlSetStructuredText parseText (format["<t align='left'>%1<br/>%2<br/>%3<br/>%4<br/>%5<br/>%6<br/>%7<br/>%8<br/>%9<br/>%10<br/>%11<br/>%12<br/>%13</t>",_line1Text,_line2Text,_line3Text,_line4Text,_line5Text,_line6Text,_line7Text,_line8Text,_line9Text,_line10Text,_line11Text,_line12Text,_line13Text]);
  66. switch (_TextColor) do {
  67. case (1): {
  68. _StructuredTextBox ctrlSetTextColor [0.886,0.255,0.259,1];
  69. };
  70. case (2): {
  71. _StructuredTextBox ctrlSetTextColor [0.78,0.149,0.318,1];
  72. };
  73. case (3): {
  74. _StructuredTextBox ctrlSetTextColor [0.133,0.145,0.149,1];
  75. };
  76. case (4): {
  77. _StructuredTextBox ctrlSetTextColor [0.984,0.988,0.996,1];
  78. };
  79. case (5): {
  80. _StructuredTextBox ctrlSetTextColor [0.075,0.09,0.106,1];
  81. };
  82. case (6): {
  83. _StructuredTextBox ctrlSetTextColor [0.153,0.153,0.176,1];
  84. };
  85. case (7): {
  86. _StructuredTextBox ctrlSetTextColor [0.039,0.875,0.231,1];
  87. };
  88. case (8): {
  89. _StructuredTextBox ctrlSetTextColor [1,0.706,0.094,1];
  90. };
  91. case (9): {
  92. _StructuredTextBox ctrlSetTextColor [0.247,0.831,0.988,1];
  93. };
  94. };
  95.  
  96.  
  97. //Created the go back button and add the button click event handeler to it
  98. //Note you do need to add all Idds for all the controlls you have created to the _Ctrls array
  99. _GoBackBtn = _display ctrlCreate ["RscButtonMenu", 1116];
  100. _GoBackBtn ctrlSetPosition [(32 - 3) * (0.025),(20 - 2) * (0.04),6 * (0.025),1 * (0.04)];
  101. _GoBackBtn ctrlCommit 0;
  102. _GoBackBtn ctrlSetText "Go Back";
  103. _GoBackBtn ctrlSetEventHandler ["ButtonClick", "[]spawn fnc_goBack"];
  104.  
  105. fnc_goBack = {
  106. _display = uiNameSpace getVariable ["RscExileXM8", displayNull];
  107. _Ctrls = [1120,1119,1112,1114,1116];
  108. {
  109. _ctrl = (_display displayCtrl _x);
  110. _ctrl ctrlSetFade 1;
  111. _ctrl ctrlCommit 0.25;
  112. ctrlEnable [_x, false];
  113. } forEach _Ctrls;
  114. execVM "xm8Apps\XM8Apps_Init.sqf";
  115. uiSleep 1;
  116. {
  117. ctrlDelete ((findDisplay 24015) displayCtrl _x);
  118. } forEach _Ctrls;
  119. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement