Advertisement
CptAntimate

lic

May 8th, 2020
416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.76 KB | None | 0 0
  1. /*
  2.     Author: Jean_Park
  3.     Teamspeak 3: ts.the-programmer.com
  4.     Web site: www.the-programmer.com
  5.     Discord : https://discord.gg/DhFUFsq
  6.  
  7.     Terms of use:
  8.         - This file is forbidden unless you have permission from the author. If you have this file without permission to use it please do not use it and do not share it.
  9.         - If you have permission to use this file, you can use it on your server however it is strictly forbidden to share it.
  10.         - Out of respect for the author please do not delete this information.
  11. */
  12. disableSerialization;
  13.  
  14.  
  15.  
  16. createDialog "The_Programmer_Iphone_Licenses_Menu";
  17.  
  18. _lic = ((findDisplay 20058) displayCtrl 1500);
  19. _struct = "";
  20. _side = {"civ"};
  21.  
  22. /*
  23. _side = switch (playerSide) do {
  24.     case west:{"cop"};
  25.     case civilian:{"civ"};
  26.     case independent:{"med"};
  27.     case east:{"adac"};
  28. };
  29. */
  30.  
  31.   if (player getVariable "CopimDienst") then {
  32.         _side = {"cop"};
  33.     };
  34.     if (player getVariable "MedimDienst") then {
  35.         _side = {"med"};
  36.     };
  37.     if (player getVariable "AdacimDienst") then {
  38.         _side = {"adac"};
  39.        
  40.         } else {
  41.         _side = {"civ"};
  42.        
  43.     };
  44.  
  45.  
  46.  
  47. {
  48.     _displayName = getText(_x >> "displayName");
  49.  
  50.     if (missionNamespace getVariable [format ["license_%1_%2",_side,(getText (missionConfigFile >> "Licenses" >> (configName _x) >> "variable"))],false]) then {
  51.         _struct = _struct + format["%1<br/>",localize _displayName];
  52.     };
  53. } foreach (format["getText(_x >> 'side') isEqualTo '%1'", _side] configClasses (missionConfigFile >> "Licenses"));
  54.  
  55. if (_struct isEqualTo "") then {
  56.     _struct = (["STR_NO_LICENSE","The_Programmer_Settings_Iphone","Iphone_Localization"] call theprogrammer_core_fnc_localize);
  57. };
  58.  
  59. _lic ctrlSetStructuredText parseText format ["<t size='0.8px'>%1</t>",_struct];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement