mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 17:20:26 +03:00
1.0.1.1 part 2
This commit is contained in:
1546
dayz_code/CfgWeaponsDeeds.hpp
Normal file
1546
dayz_code/CfgWeaponsDeeds.hpp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -162,23 +162,27 @@ if (_qty >= _qty_in) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if(_okToSell and !isNull _obj and alive _obj) then {
|
if(_okToSell) then {
|
||||||
|
|
||||||
// Sell Vehicle
|
if(!isNull _obj and alive _obj) then {
|
||||||
for "_x" from 1 to _qty_out do {
|
// Sell Vehicle
|
||||||
player addMagazine _part_out;
|
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"];
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
_objectID = _obj getVariable ["ObjectID","0"];
|
cutText [format[("Cannot sell %1, tires are too damaged."),_textPartOut] , "PLAIN DOWN"];
|
||||||
_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"];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -87,19 +87,15 @@ if (_qty >= _qty_in) then {
|
|||||||
|
|
||||||
if(dayzTradeResult == "PASS") then {
|
if(dayzTradeResult == "PASS") then {
|
||||||
|
|
||||||
for "_x" from 1 to _qty_in do {
|
_removed = ([player,_part_in,_qty_in] call BIS_fnc_invRemove);
|
||||||
if(_buy_o_sell == "buy") then {
|
|
||||||
player removeMagazine _part_in;
|
if(_removed == _qty_in) then {
|
||||||
} else {
|
for "_x" from 1 to _qty_out do {
|
||||||
player removeWeapon _part_in;
|
if(_buy_o_sell == "buy") then {
|
||||||
};
|
player addWeapon _part_out;
|
||||||
};
|
} else {
|
||||||
|
player addMagazine _part_out;
|
||||||
for "_x" from 1 to _qty_out do {
|
};
|
||||||
if(_buy_o_sell == "buy") then {
|
|
||||||
player addWeapon _part_out;
|
|
||||||
} else {
|
|
||||||
player addMagazine _part_out;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user