Skip to content

Commit

Permalink
fix(bridge/qb): improved handcuff status syncing (#1711)
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason committed May 24, 2024
1 parent 836a0b2 commit 545723d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions modules/bridge/qb/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ RegisterNetEvent('QBCore:Player:SetPlayerData', function(data)

OnPlayerData('groups', PlayerData.groups)
end
end)

RegisterNetEvent('police:client:GetCuffed', function()
PlayerData.cuffed = not PlayerData.cuffed
LocalPlayer.state:set('invBusy', PlayerData.cuffed, false)

if not PlayerData.cuffed then return end

Weapon.Disarm()
if data.metadata.ishandcuffed then
PlayerData.cuffed = true
LocalPlayer.state:set('invBusy', true, false)
Weapon.Disarm()
elseif PlayerData.cuffed then
PlayerData.cuffed = false
LocalPlayer.state:set('invBusy', false, false)
end
end)

---@diagnostic disable-next-line: duplicate-set-field
Expand Down

0 comments on commit 545723d

Please sign in to comment.