Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client side
- RegisterNetEvent('fivem-seatbelt:enable')
- AddEventHandler('fivem-seatbelt:enable', function()
- if IsPedInAnyVehicle(GetPlayerPed(-1), false) then
- beltOn = not beltOn
- if beltOn then
- TriggerEvent("ls:notify", "on.", 0.080)
- TriggerEvent("pNotify:SendNotification",{
- text = "Bälte: PÅ",
- type = "success",
- timeout = (1000),
- layout = "bottomCenter",
- queue = "global"
- })
- else
- TriggerEvent("ls:notify", "off.", 0.080)
- TriggerEvent("pNotify:SendNotification",{
- text = "Bälte: AV",
- type = "error",
- timeout = (1000),
- layout = "bottomCenter",
- queue = "global"
- })
- end
- else
- TriggerEvent("ls:notify", "Du är inte i en bil.", 0.600)
- TriggerEvent("pNotify:SendNotification",{
- text = "Du är inte i en bil.",
- type = "error",
- timeout = (1400),
- layout = "bottomCenter",
- queue = "global"
- })
- end
- end)
- config
- Cfg = {}
- Cfg.DiffTrigger = 0.255
- Cfg.MinSpeed = 19.25 --THIS IS IN m/s
- Cfg.Strings = { belt_on = 'Säkerhetsbälte ^5 på^0.', belt_off = 'Säkerhetsbälte ^1 av^0.' }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement