Guest User

Untitled

a guest
Apr 10th, 2023
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 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 Something
  8. {
  9.  
  10. private bool seatbeltOn = false;
  11.  
  12. public void Main()
  13. {
  14. if (Game.IsKeyDown(System.Windows.Forms.Keys.Z))
  15. {
  16.  
  17. if (Game.LocalPlayer.Character.CurrentVehicle.HasDriver)
  18. {
  19. seatbeltOn = !seatbeltOn;
  20. if (seatbeltOn)
  21. {
  22. Game.LocalPlayer.Character.CanBePulledOutOfVehicles = false;
  23. Game.DisplayNotification("Seatbelt ON");
  24. }
  25. else
  26. {
  27. Game.LocalPlayer.Character.CanBePulledOutOfVehicles = true;
  28. Game.DisplayNotification("Seatbelt OFF");
  29. }
  30. }
  31.  
  32.  
  33.  
  34. }
  35. }
  36.  
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment