Files
DayZ-Epoch/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_getGearItems.sqf
ebaydayz 382f3bc451 Add buying to and selling from dayz_onBack
Also:
- Fixed typo Z_fill(e)TradeTitle
- Fixed "not enough slots to accept change" message shows when "not
enough money" should show instead
2016-08-02 14:19:59 -04:00

29 lines
810 B
Plaintext

/**
* call Z_getGearItems
*
* Gets all your items stored in your gear and innitiates the selling list.
**/
private ["_mags","_weaps","_skin","_formattedText","_bag","_bags","_pic"];
#include "defines.hpp"
call Z_clearLists;
Z_SellArray = [];
Z_SellableArray = [];
_mags = magazines player;
_weaps = weapons player;
_weaps set [count _weaps,dayz_onBack];
_bag = unitBackpack player;
_bags = if (isNull _bag) then {[]} else {[typeOf _bag]};
_skin = typeOf player;
_pic = getText (configFile >> 'CfgVehicles' >> _skin >> 'portrait');
_formattedText = format [
"<img image='%1' size='3' align='center'/>"
, _pic
];
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_CONTAINERINFO) ctrlSetStructuredText parseText _formattedText;
[_weaps,_mags,toLower (localize "STR_UI_GEAR"),_bags] call Z_checkArrayInConfig;