Advertisement
Guest User

Untitled

a guest
Sep 24th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. #include "..\..\script_macros.hpp"
  2. /*
  3. File: fn_weaponShopMenu.sqf
  4. Author: Bryan "Tonic" Boardwine
  5.  
  6. Description:
  7. Something
  8. */
  9.  
  10. private _shopTitle = M_CONFIG(getText,"WeaponShops",(_this select 3),"name");
  11. private _shopSide = M_CONFIG(getText,"WeaponShops",(_this select 3),"side");
  12. private _conditions = M_CONFIG(getText,"WeaponShops",(_this select 3),"conditions");
  13.  
  14. private _exit = false;
  15. if !(_shopSide isEqualTo "") then {
  16. private _flag = switch (playerSide) do {case west: {"cop"}; case independent: {"med"}; default {"civ"};};
  17. if !(_flag isEqualTo _shopSide) then {_exit = true;};
  18. };
  19.  
  20. if (_exit) exitWith {};
  21.  
  22. _exit = [_conditions] call life_fnc_levelCheck;
  23. if !(_exit) exitWith {[localize "STR_Shop_Veh_NotAllowed",true,"slow"] call life_fnc_notificationSystem;};
  24.  
  25. uiNamespace setVariable ["Weapon_Shop",(_this select 3)];
  26. uiNamespace setVariable ["Weapon_Magazine",0];
  27. uiNamespace setVariable ["Weapon_Accessories",0];
  28. uiNamespace setVariable ["Magazine_Array",[]];
  29. uiNamespace setVariable ["Accessories_Array",[]];
  30.  
  31. if !(createDialog "life_weapon_shop") exitWith {};
  32. if (!isClass(missionConfigFile >> "WeaponShops" >> (_this select 3))) exitWith {}; //Bad config entry.
  33.  
  34. disableSerialization;
  35.  
  36. ctrlSetText[38401,_shopTitle];
  37.  
  38. private _filters = ((findDisplay 38400) displayCtrl 38402);
  39. lbClear _filters;
  40.  
  41. ctrlShow [38406,true];
  42. ctrlEnable [38406,false];
  43. ctrlShow [38407,true];
  44. ctrlEnable [38407,false];
  45.  
  46. _filters lbAdd localize "STR_Shop_Weapon_ShopInv";
  47. _filters lbAdd localize "STR_Shop_Weapon_YourInv";
  48.  
  49. _filters lbSetCurSel 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement