mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
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.
28 lines
859 B
Plaintext
28 lines
859 B
Plaintext
/**
|
|
* call Z_getBackpackItems
|
|
*
|
|
* Gets all your items stored in your gear and innitiates the selling list.
|
|
**/
|
|
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');
|
|
|
|
_formattedText = format [
|
|
"<t size='1' align='center' color='#ffffff'>%2</t><br />" +
|
|
"<img image='%1' size='3' align='center'/><br />"
|
|
, _pic, localize "STR_UI_GEAR"
|
|
];
|
|
|
|
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_CONTAINERINFO) ctrlSetStructuredText parseText _formattedText;
|
|
|
|
[_weaps,_mags,localize "STR_EPOCH_YOUR_GEAR",_bags] call Z_checkArrayInConfig;
|