mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-05-15 07:03:21 +03:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user