Skip to content

Commit

Permalink
fix(weapon): weapon hash check (#1102)
Browse files Browse the repository at this point in the history
Co-authored-by: Linden <[email protected]>
  • Loading branch information
wtfmozart and thelindat authored Jan 21, 2023
1 parent 9375b29 commit 3bd1a5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/inventory/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1848,7 +1848,7 @@ RegisterServerEvent('ox_inventory:updateWeapon', function(action, value, slot)
end
end
elseif action == 'ammo' then
if weapon.hash == `WEAPON_FIREEXTINGUISHER` or weapon.hash == `WEAPON_PETROLCAN` then
if item.hash == `WEAPON_FIREEXTINGUISHER` or item.hash == `WEAPON_PETROLCAN` or item.hash == `WEAPON_HAZARDCAN` or item.hash == `WEAPON_FERTILIZERCAN` then
weapon.metadata.durability = math.floor(value)
weapon.metadata.ammo = weapon.metadata.durability
elseif value < weapon.metadata.ammo then
Expand Down

0 comments on commit 3bd1a5d

Please sign in to comment.