mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
0.85a
This commit is contained in:
@@ -95,11 +95,6 @@ if (_bulkqty >= 1) then {
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
|
||||
dayzTradeResult = nil;
|
||||
@@ -109,31 +104,43 @@ if (_bulkqty >= 1) then {
|
||||
|
||||
_qty = {_x == _part_in} count magazines player;
|
||||
|
||||
|
||||
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 {
|
||||
player addMagazine _part_out;
|
||||
};
|
||||
if(_bos == 0) then {
|
||||
_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;
|
||||
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"];
|
||||
for "_x" from 1 to _qty_out do {
|
||||
player addMagazine _part_out;
|
||||
};
|
||||
|
||||
// [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;
|
||||
|
||||
|
||||
} else {
|
||||
_needed = _qty_in - _qty;
|
||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||
|
||||
Reference in New Issue
Block a user