Fix weapon not equippable when no ammo

This commit is contained in:
Vortrex
2022-02-18 15:36:42 -06:00
parent a4affe0f72
commit a0517b389a

View File

@@ -1072,7 +1072,6 @@ function playerSwitchItem(client, newHotBarSlot) {
deleteItem(getPlayerData(client).hotBarItems[ammoItemSlot]);
} else {
messagePlayerError(client, getLocaleString(client, "ItemUnequippableNoAmmo", getItemName(newHotBarItem), newHotBarSlot));
return false;
}
}
} else if(getItemTypeData(getItemData(newHotBarItem).itemTypeIndex).useType == VRR_ITEM_USETYPE_TAZER) {
@@ -1082,7 +1081,6 @@ function playerSwitchItem(client, newHotBarSlot) {
setPlayerWeaponDamageEvent(client, VRR_WEAPON_DAMAGE_EVENT_TAZER);
} else {
messagePlayerError(client, getLocaleString(client, "ItemUnequippableNoAmmo", getItemName(newHotBarItem), newHotBarSlot));
return false;
}
}
}