From 84e64be47eaa3f23e6904f6293a32402fa227c64 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Sun, 8 May 2016 13:30:26 -0400 Subject: [PATCH] Don't show debug message when paying with exact amount --- .../actions/AdvancedTrading/functions/z_at_payDefault.sqf | 6 +++++- SQF/dayz_code/compile/player_death.sqf | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_payDefault.sqf b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_payDefault.sqf index 5265f0d7f..466663aee 100644 --- a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_payDefault.sqf +++ b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_payDefault.sqf @@ -19,6 +19,10 @@ if (!isNull Z_vehicle && count _moneyInVehicle > 0 ) then { _nil = [Z_vehicle, _moneyInVehicle, []] call ZUPA_fnc_removeWeaponsAndMagazinesCargo; }; -_success = [_toPay, _totalWorth] call Z_returnChange; +if (_totalWorth - _toPay == 0) then { // Money in inventory was exact amount + _success = true; +} else { + _success = [_toPay,_totalWorth] call Z_returnChange; +}; _success diff --git a/SQF/dayz_code/compile/player_death.sqf b/SQF/dayz_code/compile/player_death.sqf index 77f2c4a75..7b64b145d 100644 --- a/SQF/dayz_code/compile/player_death.sqf +++ b/SQF/dayz_code/compile/player_death.sqf @@ -35,6 +35,7 @@ _killerDist = 0; if (count _this > 0) then { _killerObj = _this select 0; _killerMethod = _this select 1; + if (typeName _killerMethod == "OBJECT") exitWith {_killerMethod = "Respawned"}; if (!isNull _killerObj) then { if (!isNull _body) then {_killerDist = _body distance _killerObj;};