Wrong del item util (fixes infinite veh fix item)
This commit is contained in:
@@ -1545,13 +1545,13 @@ function playerUseItem(client, hotBarSlot) {
|
|||||||
|
|
||||||
itemData.value = itemData.value - itemTypeData.useValue;
|
itemData.value = itemData.value - itemTypeData.useValue;
|
||||||
if (itemData.value <= 0) {
|
if (itemData.value <= 0) {
|
||||||
destroyItem(itemIndex);
|
deleteItem(itemIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
markPlayerActionTipSeen(client, "VehicleRepairItemUsage");
|
|
||||||
} else {
|
} else {
|
||||||
messagePlayerError(client, getLocaleString(client, "VehicleTooFar"));
|
messagePlayerError(client, getLocaleString(client, "VehicleTooFar"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
markPlayerActionTipSeen(client, "VehicleRepairItemUsage");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1610,7 +1610,7 @@ function playerUseItem(client, hotBarSlot) {
|
|||||||
|
|
||||||
itemData.value = itemData.value - itemTypeData.useValue;
|
itemData.value = itemData.value - itemTypeData.useValue;
|
||||||
//if(itemData.value <= 0) {
|
//if(itemData.value <= 0) {
|
||||||
// destroyItem(itemIndex);
|
// deleteItem(itemIndex);
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -1705,7 +1705,7 @@ function playerUseItem(client, hotBarSlot) {
|
|||||||
meActionToNearbyPlayers(client, `bends down and plants a ${itemTypeData.name} in the ground`);
|
meActionToNearbyPlayers(client, `bends down and plants a ${itemTypeData.name} in the ground`);
|
||||||
createGroundPlant(itemIndex);
|
createGroundPlant(itemIndex);
|
||||||
if (itemData.value == 0) {
|
if (itemData.value == 0) {
|
||||||
destroyItem(itemIndex);
|
deleteItem(itemIndex);
|
||||||
switchPlayerActiveHotBarSlot(client, -1);
|
switchPlayerActiveHotBarSlot(client, -1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user