Skip to content

Commit

Permalink
fix(client/weapon): prevent weapon from disarming multiple times
Browse files Browse the repository at this point in the history
Caused by the server triggering the disarm event while it's already in progress.
  • Loading branch information
thelindat committed Feb 18, 2023
1 parent ddf424d commit 96b4cc4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/weapon/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ function Weapon.Equip(item, data)
end

function Weapon.Disarm(currentWeapon, noAnim)
if not currentWeapon?.timer then return end

if source == '' then
TriggerServerEvent('ox_inventory:updateWeapon')
end
Expand Down

0 comments on commit 96b4cc4

Please sign in to comment.