Hi there ...
Im new, low level knowledged of sqf Programming ( PHP is my world
) and use this site to get some info's to learn more about to hack Arma. Here some code from "me" (i learned from other, some pieces are from another scripts but the idea to read out the masterarray and use the existing menu's is from me), to share with you ... you can use it only in life missions, because it spawns the mission menu's that already exist's. I know the lack of entering a number for the amount of the specific item, but hey .... somewhere is the begin
choosing_script:
if (!(createDialog "distribute")) exitWith {hint "Dialog Error!"};
for [{_c=0}, {_c < (count INV_AlleItemsArray)}, {_c=_c+1}] do
{
_myItem = INV_AlleItemsArray select _c;
Item = _myItem select 2;
ItemID = Item select 0;
ItemInfo = Item select 1;
_index = lbAdd [1, format["Item: %1 (%2)", ItemInfo, ItemID] ];
lbSetData [1, _index, format["%1", str(Item) ] ];
buttonSetAction [2, " [lbData [1, (lbCurSel 1)],""""] execVM ""\mod-app\getItem.sqf""; " ];
};
GetItem Script:
// Parameters
Param_ = _this select 0;
Item_ = call compile (Param_);
ItemID_ = Item_ select 0;
// spawn Item
[ItemID_, +(1)] call INV_AddInventoryItem;
ItemID_ = nil;
Item_ = nil;
If you found this not helpful or lame, let me know i want not be the wannabe - im only interested to give something back to the community ...
Cheers
killerCH