From dbe8fb206a07d3669c4da6b2240122bae9c44260 Mon Sep 17 00:00:00 2001 From: vbawol Date: Wed, 29 May 2013 08:18:17 -0500 Subject: [PATCH] 1.0.1.1 part 3 --- dayz_code/actions/trade_backpacks.sqf | 8 +++++--- dayz_code/actions/trade_weapons.sqf | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dayz_code/actions/trade_backpacks.sqf b/dayz_code/actions/trade_backpacks.sqf index b27e74642..ce72ee5b9 100644 --- a/dayz_code/actions/trade_backpacks.sqf +++ b/dayz_code/actions/trade_backpacks.sqf @@ -102,9 +102,11 @@ if (_qty >= _qty_in) then { }; } else { // Sell - removeBackpack player; - for "_x" from 1 to _qty_out do { - player addMagazine _part_out; + if((typeOf (unitBackpack player)) == _part_in) then { + removeBackpack player; + for "_x" from 1 to _qty_out do { + player addMagazine _part_out; + }; }; }; diff --git a/dayz_code/actions/trade_weapons.sqf b/dayz_code/actions/trade_weapons.sqf index 5d696f4da..955a202e1 100644 --- a/dayz_code/actions/trade_weapons.sqf +++ b/dayz_code/actions/trade_weapons.sqf @@ -97,9 +97,10 @@ if (_qty >= _qty_in) then { player addMagazine _part_out; }; }; + cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; }; - cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; + {player removeAction _x} forEach s_player_parts;s_player_parts = []; s_player_parts_crtl = -1;