Advertisement
Guest User

Untitled

a guest
Mar 31st, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. {
  2. private["_listedItems"];
  3. _config = [];
  4. _listedItems = [];
  5. //Go through weapons
  6. if(primaryWeapon player != "") then {_config set[count _config,primaryWeapon player]};
  7. if(secondaryWeapon player != "") then {_config set[count _config,secondaryWeapon player]};
  8. if(handgunWeapon player != "") then {_config set[count _config,handgunWeapon player]};
  9.  
  10. //Go through items
  11. _config = _config + primaryWeaponItems player;
  12. _config = _config + (assignedItems player);
  13. _config = _config + (uniformItems player);
  14. _config = _config + (vestItems player);
  15. _config = _config + (backPackItems player);
  16. _config = _config - ["ItemGPS","ItemMap","ItemWatch","ItemCompass"];
  17.  
  18. ((findDisplay 38400) displayCtrl 38405) ctrlSetText localize "STR_Global_Sell";
  19. {
  20. if(!(_x in _listedItems) && _x != "") then
  21. {
  22. _itemInfo = [_x] call life_fnc_fetchCfgDetails;
  23. _listedItems set[count _listedItems,_x];
  24.  
  25. _itemCount = {_x == (_itemInfo select 0)} count _config;
  26. if(_itemCount > 1) then
  27. {
  28. _itemList lbAdd format["[%2] %1",_itemInfo select 1,_itemCount];
  29. }
  30. else
  31. {
  32. _itemList lbAdd format["%1",_itemInfo select 1];
  33. };
  34. _itemList lbSetData[(lbSize _itemList)-1,_itemInfo select 0];
  35. _itemList lbSetPicture[(lbSize _itemList)-1,_itemInfo select 2];
  36.  
  37. _config = [_shop] call life_fnc_weaponShopCfg;
  38. {
  39. if (_x select 0 == _itemInfo select 0) then {
  40. _price = _x select 2;
  41. };
  42. } foreach (_config select 1);
  43. _itemList lbSetValue[(lbSize _itemList)-1,_price];
  44. };
  45. } foreach _config;
  46. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement