Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
GhzGarage authored Nov 12, 2024
2 parents 80100fa + 00e9235 commit b088d3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/seatbelt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ end
local function toggleSeatbelt()
seatbeltOn = not seatbeltOn
SeatBeltLoop()
TriggerEvent("seatbelt:client:ToggleSeatbelt")
TriggerEvent("seatbelt:client:ToggleSeatbelt", seatbeltOn)
TriggerServerEvent("InteractSound_SV:PlayWithinDistance", 5.0, seatbeltOn and "carbuckle" or "carunbuckle", 0.25)
end

Expand All @@ -64,7 +64,7 @@ function SeatBeltLoop()
if not IsPedInAnyVehicle(PlayerPedId(), false) then
seatbeltOn = false
harnessOn = false
TriggerEvent("seatbelt:client:ToggleSeatbelt")
TriggerEvent("seatbelt:client:ToggleSeatbelt", seatbeltOn)
break
end
if not seatbeltOn and not harnessOn then break end
Expand Down Expand Up @@ -270,4 +270,4 @@ RegisterCommand('toggleseatbelt', function()
toggleSeatbelt()
end, false)

RegisterKeyMapping('toggleseatbelt', 'Toggle Seatbelt', 'keyboard', 'B')
RegisterKeyMapping('toggleseatbelt', 'Toggle Seatbelt', 'keyboard', 'B')

0 comments on commit b088d3f

Please sign in to comment.