Advertisement
Guest User

Untitled

a guest
Sep 24th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #include "..\..\script_macros.hpp"
  2. /*
  3. File: fn_weaponShopMags.sqf
  4. Author: Daniel Stuart
  5.  
  6. Description:
  7. Set Weapon Shop in magazine mode
  8. */
  9. disableSerialization;
  10.  
  11. if ((uiNamespace getVariable ["Weapon_Magazine",0]) isEqualTo 0) then {
  12. private _weapon = lbData[38403,lbCurSel (38403)];
  13. private _magArray = FETCH_CONFIG2(getArray,"CfgWeapons",_weapon,"magazines");
  14. {
  15. if (_x in FETCH_CONFIG2(getArray,"CfgWeapons",_weapon,"muzzles")) then {
  16. _magArray append FETCH_CONFIG(getArray,"CfgWeapons",_weapon,_x,"magazines");
  17. };
  18. } count ["EGLM", "GL_3GL_F"];
  19. uiNamespace setVariable ["Magazine_Array",_magArray];
  20. uiNamespace setVariable ["Weapon_Magazine",1];
  21. } else {
  22. uiNamespace setVariable ["Weapon_Magazine",0];
  23. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement