Imports System
Imports System.Windows.Forms
Imports GTA
Imports System.Drawing
Public Class police4

    Inherits Script

    Public Sub New()
        Me.Interval = 9000
    End Sub

    Shadows Sub keyDown(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyDown
        
    End Sub

    Shadows Sub keyUp(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyUp
    End Sub

    Private Sub general_tick(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Tick        
        If Player.WantedLevel > 4 Then
            Dim predators As Vehicle(), predator As Vehicle, boatpos As Vector3, fiboat As Vehicle, _
            f1, f2, f3 As Ped
            predators = World.GetAllVehicles("predator")
            For Each predator In predators
                If predator.Position.DistanceTo2D(Player.Character.Position) > 72 And predator.isOnScreen = False Then
                    boatpos = predator.Position
                    predator.Delete()
                    fiboat = World.CreateVehicle("tuga", boatpos)
                    f1 = fiboat.CreatePedOnSeat(VehicleSeat.Driver, "M_M_FBI", RelationshipGroup.Cop)
                    f2 = fiboat.CreatePedOnSeat(VehicleSeat.LeftRear, "M_M_FBI", RelationshipGroup.Cop)
                    f3 = fiboat.CreatePedOnSeat(VehicleSeat.RightRear, "M_M_FBI", RelationshipGroup.Cop)
                    f1.NoLongerNeeded()
                    f2.NoLongerNeeded()
                    f3.NoLongerNeeded()
                    f2.Task.WarpIntoVehicle(fiboat, VehicleSeat.LeftRear)
                    f3.Task.WarpIntoVehicle(fiboat, VehicleSeat.RightRear)
                    fiboat.NoLongerNeeded()
                End If
            Next
        End If
    End Sub

    Private Sub console_CMD(ByVal sender As Object, ByVal e As ConsoleEventArgs) Handles MyBase.ConsoleCommand

    End Sub

    Private Sub GraphicsEventHandler(ByVal sender As Object, ByVal e As GTA.GraphicsEventArgs) Handles MyBase.PerFrameDrawing
    End Sub

    Private Sub msg(ByVal sMsg As String, ByVal time As Int32)
        Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", sMsg, time, 1)
    End Sub
End Class
