Skip to content

Commit

Permalink
feat(client): fire event on weapon component update (#1553)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikigoalie committed Dec 22, 2023
1 parent 1a7148c commit 73fc372
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,7 @@ local function useSlot(slot)

if success then
GiveWeaponComponentToPed(playerPed, currentWeapon.hash, component)
TriggerEvent('ox_inventory:updateWeaponComponent', 'added', component, data.name)
end
end
end)
Expand Down Expand Up @@ -1568,6 +1569,7 @@ RegisterNUICallback('removeComponent', function(data, cb)

if success then
RemoveWeaponComponentFromPed(playerPed, currentWeapon.hash, component)
TriggerEvent('ox_inventory:updateWeaponComponent', 'removed', component, data.component)
end

break
Expand Down

0 comments on commit 73fc372

Please sign in to comment.