Guest User

Untitled

a guest
Apr 10th, 2023
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. using Rage;
  2.  
  3. [assembly: Rage.Attributes.Plugin("SeatBelt", Description = "Simple Seatbelt plugin", Author = "TheMoni")]
  4.  
  5. namespace Seatbelt
  6. {
  7. public class Seatbelt
  8. {
  9.  
  10. private static bool seatbeltOn = false;
  11.  
  12. public static void Main()
  13. {
  14. while (true)
  15. {
  16.  
  17.  
  18. if (Game.IsKeyDown(System.Windows.Forms.Keys.Z))
  19. {
  20.  
  21. if (Game.LocalPlayer.Character.CurrentVehicle.HasDriver)
  22. {
  23. seatbeltOn = !seatbeltOn;
  24. if (seatbeltOn)
  25. {
  26. Game.LocalPlayer.Character.CanBePulledOutOfVehicles = false;
  27. Game.DisplayNotification("Seatbelt ON");
  28. }
  29. else
  30. {
  31. Game.LocalPlayer.Character.CanBePulledOutOfVehicles = true;
  32. Game.DisplayNotification("Seatbelt OFF");
  33. }
  34. }
  35.  
  36. GameFiber.Yield();
  37. }
  38. }
  39. }
  40.  
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment