This commit is contained in:
vbawol
2013-02-01 01:47:59 -06:00
parent c4fa47f4d9
commit d8883bbf93

View File

@@ -95,11 +95,6 @@ if (_bulkqty >= 1) then {
}; };
}; };
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"];
dayzTradeResult = nil; dayzTradeResult = nil;
@@ -109,8 +104,17 @@ if (_bulkqty >= 1) then {
_qty = {_x == _part_in} count magazines player; _qty = {_x == _part_in} count magazines player;
if (_qty >= _qty_in) then { if (_qty >= _qty_in) then {
if(_bos == 0) then {
_qty = 1;
};
// trade all items
for "_x" from 1 to _qty do {
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; ["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject]; diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
@@ -132,8 +136,11 @@ if (_bulkqty >= 1) then {
} else { } else {
cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"]; cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"];
}; };
};
dayzTradeResult = nil; dayzTradeResult = nil;
} else { } else {
_needed = _qty_in - _qty; _needed = _qty_in - _qty;
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"]; cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];