Skip to content

Commit

Permalink
Added Notify To Toggle Seatbelt.
Browse files Browse the repository at this point in the history
One of the issues players face is seatbelt notification. Now I added Notify on the seatbelt...
  • Loading branch information
djontop authored Oct 29, 2023
1 parent fb448e6 commit 6648cba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/seatbelt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ local function toggleSeatbelt()
SeatBeltLoop()
TriggerEvent("seatbelt:client:ToggleSeatbelt")
TriggerServerEvent("InteractSound_SV:PlayWithinDistance", 5.0, seatbeltOn and "carbuckle" or "carunbuckle", 0.25)
local notificationText = seatbeltOn and "Seatbelt On" or "Seatbelt Off"
QBCore.Functions.Notify(notificationText, seatbeltOn and "success" or "error")
end

local function toggleHarness()
Expand Down Expand Up @@ -270,4 +272,4 @@ RegisterCommand('toggleseatbelt', function()
toggleSeatbelt()
end, false)

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

0 comments on commit 6648cba

Please sign in to comment.