From 1da6b82af56422fe8622d46a770216091bb9735a Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Fri, 3 Mar 2023 03:06:23 -0600 Subject: [PATCH] Wrong del item util (fixes infinite veh fix item) --- scripts/server/item.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/server/item.js b/scripts/server/item.js index f00a1f64..d81efbcd 100644 --- a/scripts/server/item.js +++ b/scripts/server/item.js @@ -1545,13 +1545,13 @@ function playerUseItem(client, hotBarSlot) { itemData.value = itemData.value - itemTypeData.useValue; if (itemData.value <= 0) { - destroyItem(itemIndex); + deleteItem(itemIndex); } - - markPlayerActionTipSeen(client, "VehicleRepairItemUsage"); } else { messagePlayerError(client, getLocaleString(client, "VehicleTooFar")); } + + markPlayerActionTipSeen(client, "VehicleRepairItemUsage"); break; } @@ -1610,7 +1610,7 @@ function playerUseItem(client, hotBarSlot) { itemData.value = itemData.value - itemTypeData.useValue; //if(itemData.value <= 0) { - // destroyItem(itemIndex); + // deleteItem(itemIndex); //} } } else { @@ -1705,7 +1705,7 @@ function playerUseItem(client, hotBarSlot) { meActionToNearbyPlayers(client, `bends down and plants a ${itemTypeData.name} in the ground`); createGroundPlant(itemIndex); if (itemData.value == 0) { - destroyItem(itemIndex); + deleteItem(itemIndex); switchPlayerActiveHotBarSlot(client, -1); } break;