Advanced trading by Zupa @Windmolders

Stock configuration and basic integration. WE still need config based
trader setups.
This commit is contained in:
icomrade
2016-04-27 18:23:55 -04:00
parent 1a6593d198
commit 1585765ca6
53 changed files with 3343 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
/**
* call Z_getBackpackItems
*
* Gets all your items stored in your gear and innitiates the selling list.
**/
private ["_mags","_weaps","_skin","_formattedText","_icon"];
#include "defines.sqf";
call Z_clearLists;
Z_SellArray = [];
Z_SellableArray = [];
_mags = magazines player;
_weaps = weapons player;
_skin = typeOf player;
_pic = getText (configFile >> 'CfgVehicles' >> _skin >> 'picture');
_icon = getText (configFile >> 'CfgVehicles' >> _skin >> 'icon');
if (!isNil '_pic' && _pic == "") then {
_pic = _icon;
};
_formattedText = format [
"<t size='1' align='center' color='#ffffff'> Gear </t>"
, _pic
];
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_CONTAINERINFO) ctrlSetStructuredText parseText _formattedText;
[_weaps,_mags,"your gear"] call Z_checkArrayInConfig;