From 2109fdba037e13f00863ee8b18e734d32fceec22 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Wed, 5 Oct 2016 12:17:17 -0400 Subject: [PATCH] Prevent sell from vehicle dupe Prevents dupe described here: https://epochmod.com/forum/topic/41891-resource-a-collection-of-anti-dupes/#comment-281324 --- .../actions/AdvancedTrading/functions/z_at_sellItems.sqf | 1 + 1 file changed, 1 insertion(+) diff --git a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_sellItems.sqf b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_sellItems.sqf index 9ef11c42e..bb650cddf 100644 --- a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_sellItems.sqf +++ b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_sellItems.sqf @@ -1,6 +1,7 @@ private ["_tempArray","_outcome","_vehCheckArray","_vehArray","_weaponsArray","_itemsArray","_bpArray","_bpCheckArray","_weaponsCheckArray","_itemsCheckArray","_VehKey","_wA","_mA","_money","_itemData","_success","_bag","_itemsToLog","_tCost","_tSold"]; if (count Z_SellArray < 1) exitWith { systemChat localize "STR_EPOCH_TRADE_SELL_NO_ITEMS"; }; +if (Z_SellingFrom == 1 && (isNull Z_vehicle or !local Z_vehicle)) exitWith { systemChat localize "STR_EPOCH_PLAYER_245"; }; _tempArray = Z_SellArray; closeDialog 2;