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,31 +104,43 @@ 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 {
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
waitUntil {!isNil "dayzTradeResult"};
if(dayzTradeResult == "PASS") then {
diag_log format["DEBUG Complete Trade: %1", dayzTradeResult];
for "_x" from 1 to _qty_in do {
player removeMagazine _part_in;
};
for "_x" from 1 to _qty_out do { if(_bos == 0) then {
player addMagazine _part_out; _qty = 1;
}; };
// trade all items
for "_x" from 1 to _qty do {
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
waitUntil {!isNil "dayzTradeResult"};
if(dayzTradeResult == "PASS") then {
diag_log format["DEBUG Complete Trade: %1", dayzTradeResult];
for "_x" from 1 to _qty_in do {
player removeMagazine _part_in;
};
// [player,"repair",0,false] call dayz_zombieSpeak; for "_x" from 1 to _qty_out do {
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; player addMagazine _part_out;
} else { };
cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"];
// [player,"repair",0,false] call dayz_zombieSpeak;
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
} else {
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"];