Add backpack selling to Advanced Trading

It was not possible to sell a backpack from your gear or vehicle.

Added option to sell from gear. Sell backpack from vehicle is still not
possible currently due to Arma limitations.
This commit is contained in:
ebaydayz
2016-05-05 14:55:50 -04:00
parent 2c6ef2ced3
commit fe54b78bdb
5 changed files with 51 additions and 20 deletions

View File

@@ -3,13 +3,15 @@
*
* Gets all your items stored in your gear and innitiates the selling list.
**/
private ["_mags","_weaps","_skin","_formattedText"];
private ["_mags","_weaps","_skin","_formattedText","_bag","_bags"];
#include "defines.sqf";
call Z_clearLists;
Z_SellArray = [];
Z_SellableArray = [];
_mags = magazines player;
_weaps = weapons player;
_bag = unitBackpack player;
_bags = if (isNull _bag) then {[]} else {[typeOf _bag]};
_skin = typeOf player;
_pic = getText (configFile >> 'CfgVehicles' >> _skin >> 'portrait');
@@ -22,4 +24,4 @@ _formattedText = format [
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_CONTAINERINFO) ctrlSetStructuredText parseText _formattedText;
[_weaps,_mags,localize "STR_EPOCH_YOUR_GEAR"] call Z_checkArrayInConfig;
[_weaps,_mags,localize "STR_EPOCH_YOUR_GEAR",_bags] call Z_checkArrayInConfig;