Advertisement
Guest User

Untitled

a guest
Sep 26th, 2018
554
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. client side
  2. RegisterNetEvent('fivem-seatbelt:enable')
  3. AddEventHandler('fivem-seatbelt:enable', function()
  4. if IsPedInAnyVehicle(GetPlayerPed(-1), false) then
  5. beltOn = not beltOn
  6. if beltOn then
  7. TriggerEvent("ls:notify", "on.", 0.080)
  8. TriggerEvent("pNotify:SendNotification",{
  9. text = "Bälte: PÅ",
  10. type = "success",
  11. timeout = (1000),
  12. layout = "bottomCenter",
  13. queue = "global"
  14. })
  15. else
  16. TriggerEvent("ls:notify", "off.", 0.080)
  17. TriggerEvent("pNotify:SendNotification",{
  18. text = "Bälte: AV",
  19. type = "error",
  20. timeout = (1000),
  21. layout = "bottomCenter",
  22. queue = "global"
  23. })
  24. end
  25. else
  26. TriggerEvent("ls:notify", "Du är inte i en bil.", 0.600)
  27. TriggerEvent("pNotify:SendNotification",{
  28. text = "Du är inte i en bil.",
  29. type = "error",
  30. timeout = (1400),
  31. layout = "bottomCenter",
  32. queue = "global"
  33. })
  34. end
  35. end)
  36.  
  37. config
  38.  
  39. Cfg = {}
  40. Cfg.DiffTrigger = 0.255
  41. Cfg.MinSpeed = 19.25 --THIS IS IN m/s
  42. 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