Advertisement
Guest User

NoDrivingComplaints

a guest
Mar 18th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. using GTA;
  2. using GTA.Native;
  3. using System;
  4. using System.Windows.Forms;
  5.  
  6. namespace NoDrivingComplaints
  7. {
  8.     public class MainScript : Script
  9.     {
  10.  
  11.         public MainScript()
  12.         {
  13.             Tick += OnTick;
  14.  
  15.             Interval = 0;
  16.         }
  17.  
  18.         void OnTick(object sender, EventArgs e)
  19.         {
  20.             if (Game.Player.Character.IsInVehicle())
  21.             {
  22.                 if (Function.Call<bool>(Hash.IS_AMBIENT_SPEECH_PLAYING, Game.Player.Character))
  23.                 {
  24.                     Function.Call(Hash.STOP_CURRENT_PLAYING_AMBIENT_SPEECH, Game.Player.Character);
  25.                 }
  26.             }
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement