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,8 +162,9 @@ if (_qty >= _qty_in) then {
|
||||
};
|
||||
};
|
||||
|
||||
if(_okToSell and !isNull _obj and alive _obj) then {
|
||||
if(_okToSell) then {
|
||||
|
||||
if(!isNull _obj and alive _obj) then {
|
||||
// Sell Vehicle
|
||||
for "_x" from 1 to _qty_out do {
|
||||
player addMagazine _part_out;
|
||||
@@ -180,6 +181,9 @@ if (_qty >= _qty_in) then {
|
||||
|
||||
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"];
|
||||
};
|
||||
};
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
|
||||
@@ -87,14 +87,9 @@ 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);
|
||||
|
||||
if(_removed == _qty_in) then {
|
||||
for "_x" from 1 to _qty_out do {
|
||||
if(_buy_o_sell == "buy") then {
|
||||
player addWeapon _part_out;
|
||||
@@ -102,6 +97,7 @@ if (_qty >= _qty_in) then {
|
||||
player addMagazine _part_out;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user