Don't check for ammo item on non-ammo weapons
This commit is contained in:
@@ -1281,6 +1281,9 @@ function playerUseItem(client, hotBarSlot) {
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_WEAPON: {
|
||||
if (isMeleeWeapon(itemTypeData.useId, getGame()) == true) {
|
||||
messagePlayerError(client, getLocaleString(client, "WeaponDoesNotUseAmmo", itemTypeData.name));
|
||||
} else {
|
||||
for (let i in hotBarItems) {
|
||||
if (hotBarItems[i] != -1) {
|
||||
if (getItemData(hotBarItems[i]) != false) {
|
||||
@@ -1299,6 +1302,7 @@ function playerUseItem(client, hotBarSlot) {
|
||||
}
|
||||
}
|
||||
messagePlayerError(client, getLocaleString(client, "NoAmmoToLoadIntoWeapon", itemTypeData.name));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user