1.0.1.1 part 2

This commit is contained in:
vbawol
2013-05-29 08:08:09 -05:00
parent d3d6397c27
commit 7805cc8e4f
3 changed files with 1574 additions and 28 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -162,23 +162,27 @@ if (_qty >= _qty_in) then {
};
};
if(_okToSell and !isNull _obj and alive _obj) then {
if(_okToSell) then {
// Sell Vehicle
for "_x" from 1 to _qty_out do {
player addMagazine _part_out;
if(!isNull _obj and alive _obj) then {
// Sell Vehicle
for "_x" from 1 to _qty_out do {
player addMagazine _part_out;
};
_objectID = _obj getVariable ["ObjectID","0"];
_objectUID = _obj getVariable ["ObjectUID","0"];
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
deleteVehicle _obj;
cutText [format[("Sold %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
};
_objectID = _obj getVariable ["ObjectID","0"];
_objectUID = _obj getVariable ["ObjectUID","0"];
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
deleteVehicle _obj;
cutText [format[("Sold %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
} else {
cutText [format[("Cannot sell %1, tires are too damaged."),_textPartOut] , "PLAIN DOWN"];
};
};

View File

@@ -87,19 +87,15 @@ if (_qty >= _qty_in) then {
if(dayzTradeResult == "PASS") then {
for "_x" from 1 to _qty_in do {
if(_buy_o_sell == "buy") then {
player removeMagazine _part_in;
} else {
player removeWeapon _part_in;
};
};
_removed = ([player,_part_in,_qty_in] call BIS_fnc_invRemove);
for "_x" from 1 to _qty_out do {
if(_buy_o_sell == "buy") then {
player addWeapon _part_out;
} else {
player addMagazine _part_out;
if(_removed == _qty_in) then {
for "_x" from 1 to _qty_out do {
if(_buy_o_sell == "buy") then {
player addWeapon _part_out;
} else {
player addMagazine _part_out;
};
};
};