Advertisement
Guest User

My .vb file settings

a guest
Aug 16th, 2023
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 62.05 KB | None | 0 0
  1. Imports System
  2. Imports System.Collections.Generic
  3. Imports System.Drawing
  4. Imports System.IO
  5. Imports System.Windows.Forms
  6. Imports System.Diagnostics
  7. Imports GTA
  8. Imports GTA.Math
  9. Imports GTA.Native
  10. Imports GTA.UI
  11. Imports WeaponComponent = GTA.Native.WeaponComponent
  12. Imports Microsoft.VisualBasic
  13.  
  14. '###################################################################################
  15. '###################################################################################
  16. '########### ============================================
  17. '########### Army At SixStars Dispatch Mod - Visual Basic by Nj5050 & JulioNib
  18. '########### ============================================
  19. '########### Modify this script at your own risk. Putting in random
  20. '########### values could make your game do undesirable things. ###########
  21. '###################################################################################
  22. '###################################################################################
  23.  
  24. Public Class ArmyAtSixDispatch
  25. Inherits Script
  26.  
  27. Public Sub New()
  28. AddHandler MyBase.KeyDown, AddressOf Me.mainKeyDown
  29. AddHandler MyBase.Tick, AddressOf Me.mainTick
  30. Me.myRandomSource = New Random(DateAndTime.Now.Millisecond)
  31. Me.bSixStars = False
  32. Me.crimes = 0
  33. Me.damagedPeds = New List(Of Integer)()
  34. Me.copsGroup = Nothing
  35. Me.relationshipGroup = Nothing
  36. Me.bLoadAnimatedGif = False
  37. Me.animatedGifFiles_1 = New List(Of String)()
  38. Me.animatedGifFiles_currentImages = New List(Of String)()
  39. Me.latestCopCarHeading = 0.0
  40. Me.latestCopCarSpeed = 0.0
  41. Me.createdVehicles = New List(Of Integer)()
  42. Me.createdEntities = New List(Of Entity)()
  43. MyBase.Interval = 10
  44. End Sub
  45.  
  46. Public Sub MainKeyDown(sender As Object, e As KeyEventArgs)
  47. If e.KeyCode = Keys.Subtract Then
  48. ResetScriptState()
  49. End If
  50. End Sub
  51.  
  52. Public Sub MainTick(sender As Object, e As EventArgs)
  53. Me.wantedTick()
  54. End Sub
  55.  
  56. Private Sub WantedTick()
  57. 'for testing, jump into wanted
  58. 'Me.crimes = 150
  59. 'Me.bSixStars = True
  60.  
  61. Dim flag As Boolean = Game.Player.WantedLevel = 5
  62. If flag Then
  63.  
  64. Dim flag2 As Boolean = Not Me.bSixStars
  65. If flag2 Then
  66.  
  67. Dim isShooting As Boolean = Game.Player.Character.IsShooting
  68. If isShooting Then
  69. Dim ptr As Integer = Me.crimes
  70. Me.crimes = ptr + 1
  71. End If
  72. Dim isJacking As Boolean = Game.Player.Character.IsJacking
  73. If isJacking Then
  74. Dim ptr As Integer = Me.crimes
  75. Me.crimes = ptr + 5
  76. End If
  77. Dim flag3 As Boolean = DateAndTime.Now.Subtract(Me.timerCheckKilledPeds).TotalMilliseconds > 1000.0
  78. If flag3 Then
  79. Me.timerCheckKilledPeds = DateAndTime.Now
  80. For Each ped As Ped In World.GetNearbyPeds(Game.Player.Character.Position, 100F)
  81. Try
  82. Dim flag4 As Boolean = Entity.Exists(ped) AndAlso Not Me.damagedPeds.Contains(ped.Handle) AndAlso ped.HasBeenDamagedBy(Game.Player.Character)
  83. If flag4 Then
  84. Me.damagedPeds.Add(ped.Handle)
  85. Dim ptr As Integer = Me.crimes
  86. Me.crimes = ptr + 10
  87. End If
  88. Catch ex As Exception
  89. End Try
  90. Next
  91. End If
  92. Dim flag5 As Boolean = Me.crimes > 500
  93.  
  94. If flag5 Then
  95. Me.bSixStars = True
  96. Me.bShowWNews = True ' Set bShowWNews to True when the player reaches a six-star wanted level
  97. Me.timerShowWNews = DateAndTime.Now ' Set the timer to Now when the player reaches a six-star wanted level
  98.  
  99. ' Display US President UI notification message here
  100. UI.Notify("~w~This is the US President speaking. There's report of a high-level threat in Los Santos. All available ~g~Local, Federal & Military Agencies, ~w~have been mobilized to respond. Please remain calm and stay indoors until further notice.", false)
  101. End If
  102.  
  103.  
  104. End If
  105. Else
  106. Me.crimes = 0
  107. Me.bSixStars = False
  108. End If
  109.  
  110. Dim flag6 As Boolean = Me.bSixStars
  111. If flag6 Then
  112. If Me.bShowWNews AndAlso (DateTime.Now.Subtract(Me.timerShowWNews).TotalMilliseconds < 13000) Then ' Display the News GIF animation playback image for 13 seconds
  113. ' Call the method that draws the GIF image
  114. Me.drawWezelNews()
  115. Else
  116. Me.bShowWNews = False ' Reset bShowWNews to False after the News GIF animation playback image has been displayed for 13 seconds
  117. End If
  118.  
  119. ' Draw the star GIF image only when bSixStars is True
  120. If Me.bSixStars Then
  121. Dim pos As Point = New Point(1145, 10)
  122. Dim size As Size = New Size(21, 20)
  123.  
  124. UI.DrawTexture(".\scripts\army v2\star.gif", 0, 10, 100, pos, size)
  125.  
  126. End If
  127.  
  128. If DateAndTime.Now.Subtract(Me.timerShowWNews).TotalMilliseconds >= 13000 Then
  129. Me.bShowWNews = False ' Reset bShowWNews to False after 13 seconds
  130. End If
  131. End If
  132.  
  133. Dim flag7 As Boolean = DateAndTime.Now.Subtract(Me.timerDispatch).TotalMilliseconds > 8000.0
  134. If flag7 AndAlso bSixStars Then 'Adds a second check for bSixStars here
  135. Me.timerDispatch = DateAndTime.Now
  136.  
  137. 'first, let's make all recenlty created entities as no longer needed, so game can delete them
  138. Dim num As Integer = Me.createdEntities.Count - 1
  139. For c As Integer = num To 0 Step -1
  140. Dim flag8 As Boolean = Entity.Exists(Me.createdEntities(c))
  141. If flag8 Then
  142.  
  143. Dim flag9 As Boolean = World.GetDistance(Me.createdEntities(c).Position, Game.Player.Character.Position) > 200F
  144. If flag9 Then
  145. Me.createdEntities(c).MarkAsNoLongerNeeded()
  146. End If
  147. Else
  148. Me.createdEntities.RemoveAt(c)
  149. End If
  150. Next
  151.  
  152. 'only creates if there is less than 50 entities created and existing
  153. Dim Flag10 As Boolean = Me.createdEntities.Count < 50
  154. If Flag10 Then
  155.  
  156. Dim IsInWater As Boolean = Game.Player.Character.IsInWater
  157. Dim Flag11 As Boolean = IsInWater
  158. If Flag11 Then
  159.  
  160. Me.Coastguard_heliselect()
  161. End If
  162.  
  163. Dim IsInBoat As Boolean = Game.Player.Character.IsInBoat
  164. Dim Flag12 As Boolean = IsInBoat
  165. If Flag12 Then
  166.  
  167. Me.Coastguard_heliselect()
  168. End If
  169.  
  170. Dim IsInBoat2 As Boolean = Game.Player.Character.IsInBoat
  171. Dim Flag13 As Boolean = IsInBoat
  172. If Flag13 Then
  173.  
  174. Me.NavySealselect()
  175. End If
  176.  
  177. Dim IsInWater2 As Boolean = Game.Player.Character.IsInWater
  178. Dim Flag14 As Boolean = IsInWater
  179. If Flag14 Then
  180.  
  181. Me.NavySealselect()
  182. End If
  183.  
  184. Dim IsSwimming As Boolean = Game.Player.Character.IsSwimming
  185. Dim Flag15 As Boolean = IsSwimming
  186. If Flag15 Then
  187.  
  188. Me.Coastguard_heliselect()
  189. End If
  190.  
  191. Dim IsInSub As Boolean = Game.Player.Character.IsInSub
  192. Dim Flag16 As Boolean = IsInSub
  193. If Flag16 Then
  194.  
  195. Me.Coastguard_heliselect()
  196. End If
  197.  
  198. Dim IsSwimmingUnderWater As Boolean = Game.Player.Character.IsSwimmingUnderWater
  199. Dim Flag17 As Boolean = IsSwimmingUnderWater
  200. If Flag17 Then
  201.  
  202. Me.Coastguard_heliselect()
  203. End If
  204.  
  205.  
  206. Dim IsInSub3 As Boolean = Game.Player.Character.IsInSub
  207. Dim Flag18 As Boolean = IsInSub
  208. If Flag18 Then
  209.  
  210. Me.Navy_Subselect()
  211.  
  212. UI.Notify("~b~US Navy Sub Units Have Been Dispatched Throughout The Seas Of SA, In Pursuit Of ~r~Wanted Suspect.", False)
  213. End If
  214.  
  215. Dim IsSwimmingUnderWater2 As Boolean = Game.Player.Character.IsSwimmingUnderWater
  216. Dim Flag19 As Boolean = IsSwimmingUnderWater
  217. If Flag19 Then
  218.  
  219. Me.NavySealselect()
  220. End If
  221.  
  222. Dim IsOnFoot As Boolean = Game.Player.Character.IsOnFoot
  223. Dim Flag20 As Boolean = IsOnFoot
  224. If Flag20 Then
  225.  
  226. Me.NationalGuard_carselect()
  227. End If
  228.  
  229. Dim IsShooting As Boolean = Game.Player.Character.IsShooting
  230. Dim Flag21 As Boolean = IsShooting
  231. If Flag21 Then
  232.  
  233. Me.NationalGuard_carselect()
  234. End If
  235.  
  236. Dim IsRunning As Boolean = Game.Player.Character.IsRunning
  237. Dim Flag22 As Boolean = IsRunning
  238. If Flag22 Then
  239.  
  240. Me.NationalGuard_carselect()
  241. End If
  242.  
  243. Dim IsInCombat As Boolean = Game.Player.Character.IsInCombat
  244. Dim Flag23 As Boolean = IsInCombat
  245. If Flag23 Then
  246.  
  247. Me.NationalGuard_carselect()
  248. End If
  249.  
  250. Dim IsSprinting As Boolean = Game.Player.Character.IsSprinting
  251. Dim Flag24 As Boolean = IsSprinting
  252. If Flag24 Then
  253.  
  254. Me.Fib_Tacticalselect()
  255. End If
  256.  
  257. Dim IsInMeleeCombat As Boolean = Game.Player.Character.IsInMeleeCombat
  258. Dim Flag25 As Boolean = IsInMeleeCombat
  259. If Flag25 Then
  260.  
  261. Me.Fib_Tacticalselect()
  262. End If
  263.  
  264. 'only creates if there is less than 16 entities created and existing
  265. Dim Flag26 As Boolean = Me.createdEntities.Count < 16
  266. If Flag26 Then
  267.  
  268. Dim IsInAir As Boolean = Game.Player.Character.IsInAir
  269. Dim Flag27 As Boolean = IsInAir
  270. If Flag27 Then
  271.  
  272. Me.Airforce_heliselect()
  273. End If
  274.  
  275. 'only creates if there is less than 50 entities created and existing
  276. Dim Flag28 As Boolean = Me.createdEntities.Count < 50
  277. If Flag28 Then
  278. Dim Flag29 As Boolean = Game.Player.Character.IsInVehicle()
  279. If Flag29 Then
  280.  
  281. Dim IsHelicopter As Boolean = Game.Player.Character.CurrentVehicle.Model.IsHelicopter OrElse Game.Player.Character.CurrentVehicle.Model.IsPlane OrElse Game.Player.Character.CurrentVehicle.Model.IsTrain OrElse Game.Player.Character.CurrentVehicle.Model.IsCargobob
  282. If IsHelicopter Then
  283.  
  284. Me.Airforce_heliselect()
  285. End If
  286.  
  287. Dim IsBoat As Boolean = Game.Player.Character.CurrentVehicle.Model.IsBoat
  288. If IsBoat Then
  289.  
  290. Me.Coastguard_heliselect()
  291. End If
  292.  
  293. Dim IsBike As Boolean = Game.Player.Character.CurrentVehicle.Model.IsBike OrElse Game.Player.Character.CurrentVehicle.Model.IsCar OrElse Game.Player.Character.CurrentVehicle.Model.IsTrain
  294. If IsBike Then
  295.  
  296. Me.Cia_bikeselect()
  297. End If
  298.  
  299. Dim Istank As Boolean = Game.Player.Character.CurrentVehicle.Model.IsCar
  300. If Istank Then
  301.  
  302. Me.Army_Tankselect()
  303. End If
  304.  
  305. Dim IsCar As Boolean = Game.Player.Character.CurrentVehicle.Model.IsCar OrElse Game.Player.Character.Model.IsQuadbike OrElse Game.Player.Character.CurrentVehicle.Model.IsBike
  306. If IsCar Then
  307.  
  308. Me.NationalGuard_carselect()
  309. End If
  310.  
  311. Dim IsCar2 As Boolean = Game.Player.Character.CurrentVehicle.Model.IsCar OrElse Game.Player.Character.CurrentVehicle.Model.IsBike OrElse Game.Player.Character.CurrentVehicle.Model.IsTrain
  312. If IsCar2 Then
  313.  
  314. Me.Fib_Tacticalselect()
  315. End If
  316.  
  317. Dim IsBoat2 As Boolean = Game.Player.Character.CurrentVehicle.Model.IsBoat
  318. If IsBoat2 Then
  319.  
  320. Me.NavySealselect()
  321. End If
  322. Else
  323. Dim Flag30 As Boolean = Not Game.Player.Character.IsInWater AndAlso Not Game.Player.Character.IsInAir
  324. Dim Flag31 As Boolean = Flag30
  325. If Flag31 Then
  326.  
  327. Me.NationalGuard_carselect()
  328. Else
  329.  
  330. Me.Airforce_heliselect()
  331. End If
  332. End If
  333. End If
  334. End If
  335. End If
  336. End If
  337. End Sub
  338.  
  339. Private Sub DrawWezelNews()
  340.  
  341. Dim flag As Boolean = Me.bLoadAnimatedGif
  342. If flag Then
  343. Me.bLoadAnimatedGif = False
  344. Me.animatedGifFiles_1.Clear()
  345. For Each item As String In Directory.GetFiles(".\scripts\army v2\gif\anim1")
  346. Me.animatedGifFiles_1.Add(item)
  347. Next
  348. End If
  349.  
  350. Dim flag2 As Boolean = Me.animatedGifFiles_1.Count > 0
  351. If flag2 Then
  352. Dim flag3 As Boolean = DateAndTime.Now.Subtract(Me.animatedGig_timerNextImage).TotalMilliseconds > 20.0
  353. If flag3 Then
  354. Me.animatedGig_timerNextImage = DateAndTime.Now
  355. Dim flag4 As Boolean = Me.animatedGifFiles_currentImages.Count = 0
  356. If flag4 Then
  357. Me.animatedGifFiles_currentImages.AddRange(Me.animatedGifFiles_1)
  358. End If
  359. UI.DrawTexture(Me.animatedGifFiles_currentImages(0), 0, 0, 100, New Point(0, 0), New Size(249, 139))
  360. Me.animatedGifFiles_currentImages.RemoveAt(0)
  361. End If
  362. End If
  363. End Sub
  364.  
  365. Private Sub AddVehModelToList(ByRef pList As List(Of String), pModel As String)
  366. Dim flag As Boolean = [Function].[Call](Of Boolean)(Hash._0x35B9E0803292B641, New InputArgument() { New Model(pModel).Hash })
  367. If flag Then
  368. pList.Add(pModel)
  369. End If
  370. End Sub
  371.  
  372. Private Sub NationalGuard_carselect()
  373.  
  374. Dim list As List(Of String) = New List(Of String)()
  375.  
  376. Me.addVehModelToList(list, "crusader") '1
  377. Me.addVehModelToList(list, "technical3") '2
  378. Me.addVehModelToList(list, "halftrack") '3
  379. Me.addVehModelToList(list, "barrage") '4
  380. Me.addVehModelToList(list, "barracks") '5
  381. Me.addVehModelToList(list, "minitank") '6
  382. Me.addVehModelToList(list, "barracks3") '7
  383. Me.addVehModelToList(list, "insurgent") '8
  384. Me.addVehModelToList(list, "scarab2") '9
  385. Me.addVehModelToList(list, "insurgent3") '10
  386.  
  387. Dim flag As Boolean = list.Count = 0
  388. If Not flag Then
  389. Dim source As String = list(Me.myRandomSource.[Next](0, list.Count))
  390. Dim vehicle As Vehicle = World.CreateVehicle(source, Me.getSpawnPos(90.0F) + Vector3.WorldUp * 2F)
  391.  
  392. Script.Wait(5)
  393.  
  394. Dim flag2 As Boolean = Entity.Exists(vehicle)
  395. If flag2 Then
  396.  
  397. Me.createdVehicles.Add(vehicle.Handle)
  398. Me.createdEntities.Add(vehicle)
  399.  
  400. Dim flag3 As Boolean = Not Me.checkDist(vehicle)
  401. If flag3 Then
  402.  
  403. vehicle.PlaceOnGround()
  404.  
  405. Dim list2 As List(Of VehicleSeat) = New List(Of VehicleSeat)()
  406. list2.Add(VehicleSeat.Driver) '1
  407. list2.Add(VehicleSeat.Passenger) '2
  408. list2.Add(VehicleSeat.RightRear) '3
  409. list2.Add(VehicleSeat.LeftRear) '4
  410. list2.Add(VehicleSeat.ExtraSeat5) '5
  411. list2.Add(VehicleSeat.ExtraSeat6) '6
  412. list2.Add(VehicleSeat.ExtraSeat7) '7
  413. list2.Add(VehicleSeat.ExtraSeat7) '8
  414.  
  415. Dim list3 As List(Of WeaponHash) = New List(Of WeaponHash)()
  416. list3.Add(Me.weapselect()) '1
  417. list3.Add(Me.weapselect()) '2
  418. list3.Add(Me.weapselect()) '3
  419. list3.Add(Me.weapselect()) '4
  420. list3.Add(Me.weapselect()) '5
  421. list3.Add(Me.weapselect()) '6
  422. list3.Add(Me.weapselect()) '7
  423. list3.Add(Me.weapselect()) '8
  424.  
  425. Dim list4 As List(Of WeaponComponent) = New List(Of WeaponComponent)()
  426. list4.Add(Me.weapcomponselect()) '1
  427. list4.Add(Me.weapcomponselect()) '2
  428. list4.Add(Me.weapcomponselect()) '3
  429. list4.Add(Me.weapcomponselect()) '4
  430. list4.Add(Me.weapcomponselect()) '5
  431. list4.Add(Me.weapcomponselect()) '6
  432. list4.Add(Me.weapcomponselect()) '7
  433. list4.Add(Me.weapcomponselect()) '8
  434. Try
  435. For Each vehicleSeat As VehicleSeat In list2
  436. Dim ped As Ped = vehicle.CreatePedOnSeat(vehicleSeat, Me.pedselect())
  437.  
  438. Script.Wait(5)
  439.  
  440. Dim flag4 As Boolean = Entity.Exists(ped)
  441. If flag4 Then
  442. Me.createdEntities.Add(ped)
  443. Me.setAsCop(ped)
  444.  
  445. Dim flag5 As Boolean = list3.Count = 0
  446. If flag5 Then
  447. list3.Add(Me.weapselect())
  448. list4.Add(Me.weapcomponselect())
  449. End If
  450.  
  451. 'give actual weapon and then remove it from the weapons list, this way we will equip each soldier with one weapon from the list
  452. ped.Weapons.Give(list3(0), 999, True, True)
  453. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.AdvancedRifle, WeaponComponent.AtArFlsh })
  454. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.CarbineRifle, WeaponComponent.AtArFlsh })
  455. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.BullpupRifle, WeaponComponent.AtArFlsh })
  456. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.SpecialCarbine, WeaponComponent.AtArFlsh })
  457. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.SMG, WeaponComponent.AtArFlsh })
  458. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.AssaultSMG, WeaponComponent.AtArFlsh })
  459. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.HeavyShotgun, WeaponComponent.AtArFlsh })
  460. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.AssaultShotgun, WeaponComponent.AtArFlsh })
  461. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.MarksmanRifle, WeaponComponent.AtArFlsh })
  462. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.Pistol, WeaponComponent.AtArFlsh })
  463. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.CombatPistol, WeaponComponent.AtArFlsh })
  464. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.CombatPDW, WeaponComponent.AtArFlsh })
  465. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.Pistol50, WeaponComponent.AtArFlsh })
  466. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.HeavyPistol, WeaponComponent.AtArFlsh })
  467. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.Revolver, WeaponComponent.AtArFlsh })
  468. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.GrenadeLauncher, WeaponComponent.AtArFlsh })
  469. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.PumpShotgun, WeaponComponent.AtArFlsh })
  470.  
  471. list3.RemoveAt(0)
  472.  
  473. 'set the shooting task for each soldier
  474. Dim flag6 As Boolean = vehicleSeat = VehicleSeat.Driver
  475. If flag6 Then
  476.  
  477. ped.Task.ShootAt(Game.Player.Character, 99999, CType(3607063905UI, FiringPattern))
  478. ped.AlwaysKeepTask = True
  479. ped.DrivingStyle = DrivingStyle.Normal
  480. Else
  481. ped.Task.ShootAt(Game.Player.Character, 99999, CType(3607063905UI, FiringPattern))
  482. End If
  483.  
  484. 'set that they may be deleted by the game
  485. ped.MarkAsNoLongerNeeded()
  486. End If
  487. Next
  488. Finally
  489. Dim enumerator As List(Of VehicleSeat).Enumerator
  490. CType(enumerator, IDisposable).Dispose()
  491. vehicle.MarkAsNoLongerNeeded()
  492. End Try
  493.  
  494. Dim flag7 As Boolean = Entity.Exists(Game.Player.Character.CurrentVehicle)
  495. If flag7 Then
  496. vehicle.Heading = CSng(Me.latestCopCarHeading)
  497. vehicle.Speed = CSng(Me.latestCopCarSpeed)
  498. End If
  499. End If
  500. End If
  501. End If
  502. End Sub
  503.  
  504. Private Sub Fib_tacticalselect()
  505.  
  506. Dim list As List(Of String) = New List(Of String)()
  507.  
  508. Me.addVehModelToList(list, "Barracks")
  509.  
  510. Dim flag As Boolean = list.Count = 0
  511. If Not flag Then
  512. Dim source As String = list(Me.myRandomSource.[Next](0, list.Count))
  513. Dim vehicle As Vehicle = World.CreateVehicle(source, Me.getSpawnPos(90.0F) + Vector3.WorldUp * 2F)
  514.  
  515. Script.Wait(5)
  516.  
  517. Dim flag2 As Boolean = Entity.Exists(vehicle)
  518. If flag2 Then
  519. Me.createdVehicles.Add(vehicle.Handle)
  520. Me.createdEntities.Add(vehicle)
  521.  
  522. Dim flag3 As Boolean = Not Me.checkDist(vehicle)
  523. If flag3 Then
  524.  
  525. vehicle.PlaceOnGround()
  526.  
  527. Dim list2 As List(Of VehicleSeat) = New List(Of VehicleSeat)()
  528. list2.Add(VehicleSeat.Driver) '1
  529. list2.Add(VehicleSeat.Passenger) '2
  530. list2.Add(VehicleSeat.RightRear) '3
  531. list2.Add(VehicleSeat.LeftRear) '4
  532. list2.Add(VehicleSeat.ExtraSeat5) '5
  533. list2.Add(VehicleSeat.ExtraSeat6) '6
  534.  
  535. Dim list3 As List(Of WeaponHash) = New List(Of WeaponHash)()
  536. list3.Add(Me.weapselect()) '1
  537. list3.Add(Me.weapselect()) '2
  538. list3.Add(Me.weapselect()) '3
  539. list3.Add(Me.weapselect()) '4
  540. list3.Add(Me.weapselect()) '5
  541. list3.Add(Me.weapselect()) '6
  542. Try
  543. For Each vehicleSeat As VehicleSeat In list2
  544. Dim ped As Ped = vehicle.CreatePedOnSeat(vehicleSeat, "u_m_y_juggernaut_01")
  545.  
  546. Script.Wait(5)
  547.  
  548. Dim flag4 As Boolean = Entity.Exists(ped)
  549. If flag4 Then
  550. Me.createdEntities.Add(ped)
  551. Me.setAsCop(ped)
  552.  
  553. Dim flag5 As Boolean = list3.Count = 0
  554. If flag5 Then
  555. list3.Add(Me.weapselect())
  556. End If
  557.  
  558. 'give actual weapon and then remove it from the weapons list, this way we will equip each soldier with one weapon from the list
  559. ped.Weapons.Give(list3(0), 999, True, True)
  560.  
  561. list3.RemoveAt(0)
  562.  
  563. 'set the shooting task for each soldier
  564. Dim flag6 As Boolean = vehicleSeat = VehicleSeat.Driver
  565. If flag6 Then
  566.  
  567. ped.Task.ShootAt(Game.Player.Character, 99999, CType(3607063905UI, FiringPattern))
  568. ped.AlwaysKeepTask = True
  569. ped.DrivingStyle = DrivingStyle.Normal
  570. ped.RelationshipGroup = isCop(ped)
  571. Else
  572.  
  573. ped.Task.ShootAt(Game.Player.Character, 99999)
  574. End If
  575.  
  576. 'set that they may be deleted by the game
  577. ped.MarkAsNoLongerNeeded()
  578. End If
  579. Next
  580. Finally
  581. Dim enumerator As List(Of VehicleSeat).Enumerator
  582. CType(enumerator, IDisposable).Dispose()
  583. vehicle.MarkAsNoLongerNeeded()
  584. End Try
  585. Dim flag7 As Boolean = Entity.Exists(Game.Player.Character.CurrentVehicle)
  586. If flag7 Then
  587. vehicle.Heading = CSng(Me.latestCopCarHeading)
  588. vehicle.Speed = CSng(Me.latestCopCarSpeed)
  589. End If
  590. End If
  591. End If
  592. End If
  593. End Sub
  594.  
  595. Private Sub Army_tankselect()
  596.  
  597. Dim list As List(Of String) = New List(Of String)()
  598.  
  599. Me.addVehModelToList(list, "khanjali")
  600. Me.addVehModelToList(list, "APC")
  601. Me.addVehModelToList(list, "rhino")
  602.  
  603. Dim flag As Boolean = list.Count = 0
  604. If Not flag Then
  605. Dim source As String = list(Me.myRandomSource.[Next](0, list.Count))
  606. Dim vehicle As Vehicle = World.CreateVehicle(source, Me.getSpawnPos(180.0F) + Vector3.WorldUp * 2F)
  607.  
  608. Script.Wait(5)
  609.  
  610. Dim flag2 As Boolean = Entity.Exists(vehicle)
  611. If flag2 Then
  612. Me.createdVehicles.Add(vehicle.Handle)
  613. Me.createdEntities.Add(vehicle)
  614.  
  615. Dim flag3 As Boolean = Not Me.checkDist(vehicle)
  616. If flag3 Then
  617.  
  618. Dim list2 As List(Of VehicleSeat) = New List(Of VehicleSeat)()
  619. list2.Add(VehicleSeat.Driver)
  620. list2.Add(VehicleSeat.Passenger)
  621.  
  622. Dim list3 As List(Of WeaponHash) = New List(Of WeaponHash)()
  623. list3.Add(Me.weapselect())
  624. list3.Add(Me.weapselect())
  625. Try
  626. For Each vehicleSeat As VehicleSeat In list2
  627. Dim ped As Ped = vehicle.CreatePedOnSeat(vehicleSeat, Me.pedselect())
  628.  
  629. Script.Wait(5)
  630.  
  631. Dim flag4 As Boolean = Entity.Exists(ped)
  632. If flag4 Then
  633. Me.createdEntities.Add(ped)
  634. Me.setAsCop(ped)
  635.  
  636. 'check if there still weapons in the list, use default case its empty
  637. Dim flag5 As Boolean = list3.Count = 0
  638. If flag5 Then
  639. list3.Add(Me.weapselect())
  640. End If
  641.  
  642. 'give actual weapon and then remove it from the weapons list, this way we will equip each soldier with one weapon from the list
  643. ped.Weapons.Give(list3(0), 999, True, True)
  644.  
  645. list3.RemoveAt(0)
  646.  
  647. 'set the shooting task for each soldier
  648. Dim flag6 As Boolean = vehicleSeat = VehicleSeat.Driver
  649. If flag6 Then
  650.  
  651. ped.Task.ShootAt(Game.Player.Character, 99999, CType(3607063905UI, FiringPattern))
  652. ped.AlwaysKeepTask = True
  653. ped.DrivingStyle = DrivingStyle.Normal
  654. Else
  655.  
  656. ped.Task.ShootAt(Game.Player.Character, 99999)
  657. End If
  658.  
  659. 'set that they may be deleted by the game
  660. ped.MarkAsNoLongerNeeded()
  661. End If
  662. Next
  663. Finally
  664. Dim enumerator As List(Of VehicleSeat).Enumerator
  665. CType(enumerator, IDisposable).Dispose()
  666. vehicle.MarkAsNoLongerNeeded()
  667. End Try
  668. Dim flag7 As Boolean = Entity.Exists(Game.Player.Character.CurrentVehicle)
  669. If flag7 Then
  670. vehicle.Heading = Game.Player.Character.CurrentVehicle.Heading
  671. vehicle.Speed = Game.Player.Character.CurrentVehicle.Speed
  672. End If
  673. End If
  674. End If
  675. End If
  676. End Sub
  677.  
  678. Private Sub Cia_bikeselect()
  679.  
  680. Dim list As List(Of String) = New List(Of String)()
  681.  
  682. Me.addVehModelToList(list, "vader")
  683. Me.addVehModelToList(list, "hakuchou")
  684.  
  685. Dim flag As Boolean = list.Count = 0
  686. If Not flag Then
  687. Dim source As String = list(Me.myRandomSource.[Next](0, list.Count))
  688. Dim vehicle As Vehicle = World.CreateVehicle(source, Me.getSpawnPos(90.0F) + Vector3.WorldUp * 2F)
  689.  
  690. Script.Wait(5)
  691.  
  692. Dim flag2 As Boolean = Entity.Exists(vehicle)
  693. If flag2 Then
  694. Me.createdVehicles.Add(vehicle.Handle)
  695. Me.createdEntities.Add(vehicle)
  696.  
  697. Dim flag3 As Boolean = Not Me.checkDist(vehicle)
  698. If flag3 Then
  699. Dim list2 As List(Of VehicleSeat) = New List(Of VehicleSeat)()
  700. list2.Add(VehicleSeat.Driver)
  701.  
  702. Dim list3 As List(Of WeaponHash) = New List(Of WeaponHash)()
  703. list3.Add(Me.weapselect())
  704.  
  705. Dim list4 As List(Of WeaponComponent) = New List(Of WeaponComponent)()
  706. list4.Add(Me.weapcomponselect()) '1
  707. Try
  708. For Each vehicleSeat As VehicleSeat In list2
  709. Dim ped As Ped = vehicle.CreatePedOnSeat(vehicleSeat, "s_m_m_highsec_01")
  710.  
  711. Script.Wait(5)
  712.  
  713. Dim flag4 As Boolean = Entity.Exists(ped)
  714. If flag4 Then
  715. Me.createdEntities.Add(ped)
  716. Me.setAsCop(ped)
  717.  
  718. Dim flag5 As Boolean = list3.Count = 0
  719. If flag5 Then
  720. list3.Add(Me.weapselect())
  721. list4.Add(Me.weapcomponselect())
  722. End If
  723.  
  724. 'give actual weapon and then remove it from the weapons list, this way we will equip each soldier with one weapon from the list
  725. ped.Weapons.Give(list3(0), 999, True, True)
  726.  
  727. 'peds on bikes needs a pistol to shoot, or sub machine guns
  728. ped.Weapons.Give(WeaponHash.Pistol, 999, True, True)
  729. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.AdvancedRifle, WeaponComponent.AtArFlsh })
  730. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.CarbineRifle, WeaponComponent.AtArFlsh })
  731. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.BullpupRifle, WeaponComponent.AtArFlsh })
  732. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.SpecialCarbine, WeaponComponent.AtArFlsh })
  733. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.SMG, WeaponComponent.AtArFlsh })
  734. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.AssaultSMG, WeaponComponent.AtArFlsh })
  735. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.HeavyShotgun, WeaponComponent.AtArFlsh })
  736. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.AssaultShotgun, WeaponComponent.AtArFlsh })
  737. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.MarksmanRifle, WeaponComponent.AtArFlsh })
  738. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.Pistol, WeaponComponent.AtArFlsh })
  739. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.CombatPistol, WeaponComponent.AtArFlsh })
  740. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.CombatPDW, WeaponComponent.AtArFlsh })
  741. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.Pistol50, WeaponComponent.AtArFlsh })
  742. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.HeavyPistol, WeaponComponent.AtArFlsh })
  743. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.Revolver, WeaponComponent.AtArFlsh })
  744. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.GrenadeLauncher, WeaponComponent.AtArFlsh })
  745. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.PumpShotgun, WeaponComponent.AtArFlsh })
  746.  
  747. list3.RemoveAt(0)
  748.  
  749. 'set the shooting task for each soldier
  750. Dim flag6 As Boolean = vehicleSeat = VehicleSeat.Driver
  751. If flag6 Then
  752.  
  753. ped.Task.ShootAt(Game.Player.Character, 99999, CType(3607063905UI, FiringPattern))
  754. ped.AlwaysKeepTask = True
  755. ped.DrivingStyle = DrivingStyle.Rushed
  756. ped.RelationshipGroup = isCop(ped)
  757. Else
  758. ped.Task.ShootAt(Game.Player.Character, 99999)
  759. End If
  760.  
  761. 'set that they may be deleted by the game
  762. ped.MarkAsNoLongerNeeded()
  763. End If
  764. Next
  765. Finally
  766. Dim enumerator As List(Of VehicleSeat).Enumerator
  767. CType(enumerator, IDisposable).Dispose()
  768. vehicle.MarkAsNoLongerNeeded()
  769. End Try
  770. Dim flag7 As Boolean = Entity.Exists(Game.Player.Character.CurrentVehicle)
  771. If flag7 Then
  772. vehicle.Heading = Game.Player.Character.CurrentVehicle.Heading
  773. vehicle.Speed = Game.Player.Character.CurrentVehicle.Speed
  774. End If
  775. End If
  776. End If
  777. End If
  778. End Sub
  779.  
  780. Private Sub Navy_Subselect()
  781.  
  782. Dim list As List(Of String) = New List(Of String)()
  783.  
  784. Me.addVehModelToList(list, "Kosatka")
  785.  
  786. Dim flag As Boolean = list.Count = 0
  787. If Not flag Then
  788. Dim source As String = list(Me.myRandomSource.[Next](0, list.Count))
  789. Dim vector As Vector3 = Me.getSpawnPosInWater(300.0F) + Vector3.WorldDown * 10F
  790.  
  791. Dim flag2 As Boolean = vector = Nothing
  792. If Not flag2 Then
  793. Dim vehicle As Vehicle = World.CreateVehicle(source, vector)
  794.  
  795. Script.Wait(5)
  796.  
  797. Dim flag3 As Boolean = Entity.Exists(vehicle)
  798. If flag3 Then
  799. Me.createdVehicles.Add(vehicle.Handle)
  800. Me.createdEntities.Add(vehicle)
  801.  
  802. Dim flag4 As Boolean = Not Me.checkDist(vehicle)
  803.  
  804. If flag4 Then
  805. Dim list2 As List(Of VehicleSeat) = New List(Of VehicleSeat)()
  806. list2.Add(VehicleSeat.Driver) '1
  807. list2.Add(VehicleSeat.Passenger) '2
  808. list2.Add(VehicleSeat.RightRear) '3
  809. list2.Add(VehicleSeat.LeftRear) '4
  810. list2.Add(VehicleSeat.ExtraSeat5) '5
  811. list2.Add(VehicleSeat.ExtraSeat6) '6
  812.  
  813. Dim list3 As List(Of WeaponHash) = New List(Of WeaponHash)()
  814. list3.Add(Me.weapselect()) '1
  815. list3.Add(Me.weapselect()) '2
  816. list3.Add(Me.weapselect()) '3
  817. list3.Add(Me.weapselect()) '4
  818. list3.Add(Me.weapselect()) '5
  819. list3.Add(Me.weapselect()) '6
  820. Try
  821. For Each vehicleSeat As VehicleSeat In list2
  822. Dim ped As Ped = vehicle.CreatePedOnSeat(vehicleSeat, "s_m_m_Marine_01")
  823.  
  824. Script.Wait(5)
  825.  
  826. Dim flag5 As Boolean = Entity.Exists(ped)
  827. If flag5 Then
  828. Me.createdEntities.Add(ped)
  829. Me.setAsCop(ped)
  830.  
  831. Dim flag6 As Boolean = list3.Count = 0
  832. 'check if there still weapons in the list, use default case its empty
  833. If flag6 Then
  834. list3.Add(Me.weapselect())
  835. End If
  836.  
  837. 'give actual weapon and then remove it from the weapons list, this way we will equip each soldier with one weapon from the list
  838. ped.Weapons.Give(list3(0), 999, True, True)
  839.  
  840. list3.RemoveAt(0)
  841.  
  842. Dim flag7 As Boolean = vehicleSeat = VehicleSeat.Driver
  843. If flag7 Then
  844.  
  845. 'set the shooting task for each soldier
  846. ped.Task.ShootAt(Game.Player.Character, 99999, CType(3607063905UI, FiringPattern))
  847. ped.AlwaysKeepTask = True
  848. ped.DrivingStyle = DrivingStyle.Rushed
  849. Else
  850.  
  851. ped.Task.ShootAt(Game.Player.Character, 99999, CType(3607063905UI, FiringPattern))
  852. End If
  853.  
  854. 'set that they may be deleted by the game
  855. ped.MarkAsNoLongerNeeded()
  856. End If
  857. Next
  858. Finally
  859. Dim enumerator As List(Of VehicleSeat).Enumerator
  860. CType(enumerator, IDisposable).Dispose()
  861. vehicle.MarkAsNoLongerNeeded()
  862. End Try
  863. Dim flag8 As Boolean = Entity.Exists(Game.Player.Character.CurrentVehicle)
  864. If flag8 Then
  865. vehicle.Heading = Game.Player.Character.CurrentVehicle.Heading
  866. vehicle.Speed = Game.Player.Character.CurrentVehicle.Speed
  867. End If
  868. End If
  869. End If
  870. End If
  871. End If
  872. End Sub
  873.  
  874. Private Sub NavySealselect()
  875.  
  876. Dim list As List(Of String) = New List(Of String)()
  877.  
  878. Me.addVehModelToList(list, "dinghy5")
  879. Me.addVehModelToList(list, "dinghy2")
  880.  
  881. Dim flag As Boolean = list.Count = 0
  882. If Not flag Then
  883. Dim source As String = list(Me.myRandomSource.[Next](0, list.Count))
  884. Dim spawnPosInWater As Vector3 = Me.getSpawnPosInWater(140.0F)
  885.  
  886. Dim flag2 As Boolean = spawnPosInWater = Nothing
  887. If Not flag2 Then
  888.  
  889. Dim vehicle As Vehicle = World.CreateVehicle(source, spawnPosInWater)
  890.  
  891. Script.Wait(5)
  892.  
  893. Dim flag3 As Boolean = Entity.Exists(vehicle)
  894. If flag3 Then
  895. Me.createdVehicles.Add(vehicle.Handle)
  896. Me.createdEntities.Add(vehicle)
  897.  
  898. Dim flag4 As Boolean = Not Me.checkDist(vehicle)
  899.  
  900. If flag4 Then
  901. Dim list2 As List(Of VehicleSeat) = New List(Of VehicleSeat)()
  902. list2.Add(VehicleSeat.Driver) '1
  903. list2.Add(VehicleSeat.Passenger) '2
  904. list2.Add(VehicleSeat.RightRear) '3
  905. list2.Add(VehicleSeat.LeftRear) '4
  906. list2.Add(VehicleSeat.ExtraSeat1) '5
  907.  
  908. Dim list3 As List(Of WeaponHash) = New List(Of WeaponHash)()
  909. list3.Add(Me.weapselect()) '1
  910. list3.Add(Me.weapselect()) '2
  911. list3.Add(Me.weapselect()) '3
  912. list3.Add(Me.weapselect()) '4
  913. list3.Add(Me.weapselect()) '5
  914.  
  915. Dim list4 As List(Of WeaponComponent) = New List(Of WeaponComponent)()
  916. list4.Add(Me.weapcomponselect()) '1
  917. list4.Add(Me.weapcomponselect()) '2
  918. list4.Add(Me.weapcomponselect()) '3
  919. list4.Add(Me.weapcomponselect()) '4
  920. list4.Add(Me.weapcomponselect()) '5
  921. Try
  922. For Each vehicleSeat As VehicleSeat In list2
  923. Dim ped As Ped = vehicle.CreatePedOnSeat(vehicleSeat, Me.pedselect())
  924.  
  925. Script.Wait(5)
  926.  
  927. Dim flag5 As Boolean = Entity.Exists(ped)
  928. If flag5 Then
  929. Me.createdEntities.Add(ped)
  930. Me.setAsCop(ped)
  931.  
  932. 'check if there still weapons in the list, use default case its empty
  933. Dim flag6 As Boolean = list3.Count = 0
  934. If flag6 Then
  935. list3.Add(Me.weapselect())
  936. list4.Add(Me.weapcomponselect())
  937. End If
  938.  
  939. 'give actual weapon and then remove it from the weapons list, this way we will equip each soldier with one weapon from the list
  940. ped.Weapons.Give(list3(0), 999, True, True)
  941. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.AdvancedRifle, WeaponComponent.AtArFlsh })
  942. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.CarbineRifle, WeaponComponent.AtArFlsh })
  943. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.BullpupRifle, WeaponComponent.AtArFlsh })
  944. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.SpecialCarbine, WeaponComponent.AtArFlsh })
  945. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.SMG, WeaponComponent.AtArFlsh })
  946. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.AssaultSMG, WeaponComponent.AtArFlsh })
  947. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.HeavyShotgun, WeaponComponent.AtArFlsh })
  948. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.AssaultShotgun, WeaponComponent.AtArFlsh })
  949. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.MarksmanRifle, WeaponComponent.AtArFlsh })
  950. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.Pistol, WeaponComponent.AtArFlsh })
  951. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.CombatPistol, WeaponComponent.AtArFlsh })
  952. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.CombatPDW, WeaponComponent.AtArFlsh })
  953. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.Pistol50, WeaponComponent.AtArFlsh })
  954. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.HeavyPistol, WeaponComponent.AtArFlsh })
  955. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.Revolver, WeaponComponent.AtArFlsh })
  956. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.GrenadeLauncher, WeaponComponent.AtArFlsh })
  957. [Function].[Call](Hash.GIVE_WEAPON_COMPONENT_TO_PED, New InputArgument() { ped, WeaponHash.PumpShotgun, WeaponComponent.AtArFlsh })
  958.  
  959. list3.RemoveAt(0)
  960.  
  961. 'set the shooting task for each soldier
  962. Dim flag7 As Boolean = vehicleSeat = VehicleSeat.Driver
  963. If flag7 Then
  964.  
  965. ped.Task.ShootAt(Game.Player.Character, 99999, CType(3607063905UI, FiringPattern))
  966. ped.DrivingStyle = DrivingStyle.Rushed
  967. ped.AlwaysKeepTask = True
  968. Else
  969. ped.Task.ShootAt(Game.Player.Character, 99999)
  970. End If
  971.  
  972. 'set that they may be deleted by the game
  973. ped.MarkAsNoLongerNeeded()
  974. End If
  975. Next
  976. Finally
  977. Dim enumerator As List(Of VehicleSeat).Enumerator
  978. CType(enumerator, IDisposable).Dispose()
  979. vehicle.MarkAsNoLongerNeeded()
  980. End Try
  981. Dim flag8 As Boolean = Entity.Exists(Game.Player.Character.CurrentVehicle)
  982. If flag8 Then
  983. vehicle.Heading = Game.Player.Character.CurrentVehicle.Heading
  984. vehicle.Speed = Game.Player.Character.CurrentVehicle.Speed
  985. End If
  986. End If
  987. End If
  988. End If
  989. End If
  990. End Sub
  991.  
  992. Private Sub Coastguard_heliselect()
  993.  
  994. Dim list As List(Of String) = New List(Of String)()
  995.  
  996. Me.addVehModelToList(list, "annihilator2")
  997.  
  998. Dim flag As Boolean = list.Count = 0
  999. If Not flag Then
  1000. Dim source As String = list(Me.myRandomSource.[Next](0, list.Count))
  1001. Dim vehicle As Vehicle = World.CreateVehicle(source, Me.getHeliSpawnPos(180.0F))
  1002.  
  1003. Script.Wait(5)
  1004.  
  1005. Dim flag2 As Boolean = Entity.Exists(vehicle)
  1006. If flag2 Then
  1007. Me.createdVehicles.Add(vehicle.Handle)
  1008. Me.createdEntities.Add(vehicle)
  1009. [Function].[Call](Hash._0xA178472EBB8AE60D, New InputArgument() { vehicle })
  1010.  
  1011. Dim flag3 As Boolean = Not Me.checkDist(vehicle)
  1012.  
  1013. If flag3 Then
  1014. Dim list2 As List(Of VehicleSeat) = New List(Of VehicleSeat)()
  1015. list2.Add(VehicleSeat.Driver) '1
  1016. list2.Add(VehicleSeat.Passenger) '2
  1017. list2.Add(VehicleSeat.RightRear) '3
  1018. list2.Add(VehicleSeat.LeftRear) '4
  1019. list2.Add(VehicleSeat.ExtraSeat1) '5
  1020. list2.Add(VehicleSeat.ExtraSeat2) '6
  1021.  
  1022. Dim list3 As List(Of WeaponHash) = New List(Of WeaponHash)()
  1023. list3.Add(Me.weapselect()) '1
  1024. list3.Add(Me.weapselect()) '2
  1025. list3.Add(Me.weapselect()) '3
  1026. list3.Add(Me.weapselect()) '4
  1027. list3.Add(Me.weapselect()) '5
  1028. list3.Add(Me.weapselect()) '6
  1029. Try
  1030. For Each vehicleSeat As VehicleSeat In list2
  1031. Dim ped As Ped = vehicle.CreatePedOnSeat(vehicleSeat, "s_m_y_uscg_01")
  1032.  
  1033. Script.Wait(5)
  1034.  
  1035. Dim flag4 As Boolean = Entity.Exists(ped)
  1036. If flag4 Then
  1037. Me.createdEntities.Add(ped)
  1038. Me.setAsCop(ped)
  1039.  
  1040. 'check if there still weapons in the list, use default case its empty
  1041. Dim flag5 As Boolean = list3.Count = 0
  1042. If flag5 Then
  1043. list3.Add(Me.weapselect())
  1044. End If
  1045.  
  1046. 'give actual weapon and then remove it from the weapons list, this way we will equip each soldier with one weapon from the list
  1047. ped.Weapons.Give(list3(0), 999, True, True)
  1048.  
  1049. list3.RemoveAt(0)
  1050.  
  1051. 'set the shooting task for each soldier
  1052. Dim flag6 As Boolean = vehicleSeat = VehicleSeat.Driver
  1053. If flag6 Then
  1054.  
  1055. ped.Task.ShootAt(Game.Player.Character, 99999, CType(2437838959UI, FiringPattern))
  1056. ped.DrivingStyle = DrivingStyle.Normal
  1057. ped.AlwaysKeepTask = True
  1058. Else
  1059. ped.Task.ShootAt(Game.Player.Character, 99999)
  1060. End If
  1061.  
  1062. 'set that they may be deleted by the game
  1063. ped.MarkAsNoLongerNeeded()
  1064. End If
  1065. Next
  1066. Finally
  1067. Dim enumerator As List(Of VehicleSeat).Enumerator
  1068. CType(enumerator, IDisposable).Dispose()
  1069. vehicle.MarkAsNoLongerNeeded()
  1070. End Try
  1071. Dim flag7 As Boolean = Entity.Exists(Game.Player.Character.CurrentVehicle)
  1072. If flag7 Then
  1073. vehicle.Heading = Game.Player.Character.CurrentVehicle.Heading
  1074. vehicle.Speed = Game.Player.Character.CurrentVehicle.Speed
  1075. End If
  1076. End If
  1077. End If
  1078. End If
  1079. End Sub
  1080.  
  1081. Private Sub Airforce_heliselect()
  1082.  
  1083. Dim list As List(Of String) = New List(Of String)()
  1084.  
  1085. Me.addVehModelToList(list, "cargobob")
  1086. Me.addVehModelToList(list, "buzzard2")
  1087.  
  1088. Dim flag As Boolean = list.Count = 0
  1089. If Not flag Then
  1090. Dim source As String = list(Me.myRandomSource.[Next](0, list.Count))
  1091. Dim vehicle As Vehicle = World.CreateVehicle(source, Me.getHeliSpawnPos(180.0F))
  1092.  
  1093. Script.Wait(5)
  1094.  
  1095. Dim flag2 As Boolean = Entity.Exists(vehicle)
  1096. If flag2 Then
  1097. Me.createdVehicles.Add(vehicle.Handle)
  1098. Me.createdEntities.Add(vehicle)
  1099. [Function].[Call](Hash._0xA178472EBB8AE60D, New InputArgument() { vehicle })
  1100. Dim flag3 As Boolean = Not Me.checkDist(vehicle)
  1101. If flag3 Then
  1102.  
  1103. Dim list2 As List(Of VehicleSeat) = New List(Of VehicleSeat)()
  1104. list2.Add(VehicleSeat.Driver) '1
  1105. list2.Add(VehicleSeat.Passenger) '2
  1106. list2.Add(VehicleSeat.RightRear) '3
  1107. list2.Add(VehicleSeat.LeftRear) '4
  1108.  
  1109. Dim list3 As List(Of WeaponHash) = New List(Of WeaponHash)()
  1110. list3.Add(CType(2210333304UI, WeaponHash)) '1 CarbineRifle
  1111. list3.Add(CType(2210333304UI, WeaponHash)) '2 CarbineRifle
  1112. list3.Add(CType(2210333304UI, WeaponHash)) '3 CarbineRifle
  1113. list3.Add(WeaponHash.SniperRifle) '4
  1114. Try
  1115. For Each vehicleSeat As VehicleSeat In list2
  1116. Dim ped As Ped = vehicle.CreatePedOnSeat(vehicleSeat, Me.pedselect())
  1117.  
  1118. Script.Wait(5)
  1119.  
  1120. Dim flag4 As Boolean = Entity.Exists(ped)
  1121. If flag4 Then
  1122. Me.createdEntities.Add(ped)
  1123. Me.setAsCop(ped)
  1124.  
  1125. 'check if there still weapons in the list, use default case its empty
  1126. Dim flag5 As Boolean = list3.Count = 0
  1127. If flag5 Then
  1128.  
  1129. list3.Add(CType(2210333304UI, WeaponHash))
  1130. End If
  1131.  
  1132. 'give actual weapon and then remove it from the weapons list, this way we will equip each soldier with one weapon from the list
  1133. ped.Weapons.Give(list3(0), 999, True, True)
  1134.  
  1135. list3.RemoveAt(0)
  1136.  
  1137. 'set the shooting task for each soldier
  1138. Dim flag6 As Boolean = vehicleSeat = VehicleSeat.Driver
  1139. If flag6 Then
  1140.  
  1141. ped.Task.ShootAt(Game.Player.Character, 99999, CType(2437838959UI, FiringPattern))
  1142. ped.DrivingStyle = DrivingStyle.Normal
  1143. ped.AlwaysKeepTask = True
  1144. Else
  1145. ped.Task.ShootAt(Game.Player.Character, 99999)
  1146. End If
  1147.  
  1148. 'set that they may be deleted by the game
  1149. ped.MarkAsNoLongerNeeded()
  1150. vehicle.MarkAsNoLongerNeeded()
  1151. End If
  1152. Next
  1153. Finally
  1154. Dim enumerator As List(Of VehicleSeat).Enumerator
  1155. CType(enumerator, IDisposable).Dispose()
  1156. End Try
  1157. Dim flag7 As Boolean = Entity.Exists(Game.Player.Character.CurrentVehicle)
  1158. If flag7 Then
  1159. vehicle.Heading = Game.Player.Character.CurrentVehicle.Heading
  1160. vehicle.Speed = Game.Player.Character.CurrentVehicle.Speed
  1161. End If
  1162. End If
  1163. End If
  1164. End If
  1165. End Sub
  1166.  
  1167. Private Sub SetAsCop(p As Ped)
  1168. Dim flag As Boolean = Me.copsGroup IsNot Nothing
  1169. If flag Then
  1170. Me.copsGroup.Add(p, False)
  1171. End If
  1172. [Function].[Call](Hash._0xBB03C38DD3FB7FFD, New InputArgument() { p, True })
  1173. End Sub
  1174.  
  1175. Private Function CheckDist(e As Entity) As Boolean
  1176. Dim flag As Boolean = World.GetDistance(Game.Player.Character.Position, e.Position) < 30F
  1177. Dim result As Boolean
  1178. If flag Then
  1179. e.Delete()
  1180. result = True
  1181. Else
  1182. result = False
  1183. End If
  1184. Return result
  1185. End Function
  1186.  
  1187. Private Function Pedselect() As String
  1188. Dim result As String
  1189. Select Case Me.myRandomSource.[Next](6)
  1190. Case 0
  1191. result = "s_m_m_Marine_01"
  1192. Case 1
  1193. result = "s_m_m_Marine_02"
  1194. Case 2
  1195. result = "s_m_y_Marine_01"
  1196. Case 3
  1197. result = "s_m_y_Marine_02"
  1198. Case 4
  1199. result = "s_m_y_Marine_03"
  1200. Case Else
  1201. result = "s_m_y_blackops_01"
  1202.  
  1203. 'Case 6
  1204. ' return "s_m_y_blackops_02"
  1205. 'Case 7
  1206. ' return "s_m_m_Marine_01"
  1207. 'Case 8
  1208. ' return "s_m_y_uscg_01"
  1209. 'Case 9
  1210. ' return "s_m_m_highsec_01"
  1211. 'Case 10
  1212. ' return "u_m_y_juggernaut_01"
  1213.  
  1214. End Select
  1215. Return result
  1216. End Function
  1217.  
  1218. Private Function Weapcomponselect() As WeaponComponent
  1219. Dim num As Integer = Me.myRandomSource.[Next](17)
  1220. Dim flag As Boolean = num >= 0 AndAlso num <= 3
  1221. Dim result As WeaponComponent
  1222. If flag Then
  1223. result = WeaponComponent.AtArFlsh 'Flashlight
  1224. Else
  1225. flag = (num >= 4 AndAlso num <= 10)
  1226. If flag Then
  1227. result = WeaponComponent.AtArFlsh
  1228. Else
  1229. flag = (num >= 11 AndAlso num <= 15)
  1230. If flag Then
  1231. result = WeaponComponent.AtArFlsh
  1232. Else
  1233. flag = (num >= 16 AndAlso num <= 20)
  1234. If flag Then
  1235. result = WeaponComponent.AtArFlsh
  1236. Else
  1237. flag = (num >= 21 AndAlso num <= 23)
  1238. If flag Then
  1239. result = WeaponComponent.AtArFlsh
  1240. Else
  1241. flag = (num >= 24 AndAlso num <= 26)
  1242. If flag Then
  1243. result = WeaponComponent.AtArFlsh
  1244. Else
  1245. flag = (num >= 27 AndAlso num <= 29)
  1246. If flag Then
  1247. result = WeaponComponent.AtArFlsh
  1248. Else
  1249. flag = (num >= 30 AndAlso num <= 32)
  1250. If flag Then
  1251. result = WeaponComponent.AtArFlsh
  1252. Else
  1253. flag = (num >= 41 AndAlso num <= 43)
  1254. If flag Then
  1255. result = WeaponComponent.AtArFlsh
  1256. Else
  1257. flag = (num >= 47 AndAlso num <= 49)
  1258. If flag Then
  1259. result = WeaponComponent.AtPiFlsh
  1260. Else
  1261. flag = (num >= 50 AndAlso num <= 53)
  1262. If flag Then
  1263. result = WeaponComponent.AtPiFlsh
  1264. Else
  1265. flag = (num = 54)
  1266. If flag Then
  1267. result = WeaponComponent.AtArFlsh
  1268. Else
  1269. flag = (num = 55)
  1270. If flag Then
  1271. result = WeaponComponent.AtPiFlsh
  1272. Else
  1273. flag = (num = 56)
  1274. If flag Then
  1275. result = WeaponComponent.AtPiFlsh
  1276. Else
  1277. flag = (num = 57)
  1278. If flag Then
  1279. result = WeaponComponent.AtPiFlsh
  1280. Else
  1281. flag = (num = 58)
  1282. If flag Then
  1283. result = WeaponComponent.AtArFlsh
  1284. Else
  1285. result = WeaponComponent.AtArFlsh
  1286. End If
  1287. End If
  1288. End If
  1289. End If
  1290. End If
  1291. End If
  1292. End If
  1293. End If
  1294. End If
  1295. End If
  1296. End If
  1297. End If
  1298. End If
  1299. End If
  1300. End If
  1301. End If
  1302. Return result
  1303. End Function
  1304.  
  1305. Private Function Weapselect() As WeaponHash
  1306. Dim num As Integer = Me.myRandomSource.[Next](64)
  1307. Dim flag As Boolean = num >= 0 AndAlso num <= 3
  1308. Dim result As WeaponHash
  1309. If flag Then
  1310. result = CType(2937143193UI, WeaponHash) 'Native.WeaponHash.AdvancedRifle
  1311. Else
  1312. flag = (num >= 4 AndAlso num <= 10)
  1313. If flag Then
  1314. result = CType(2210333304UI, WeaponHash) 'Native.WeaponHash.CarbineRifle
  1315. Else
  1316. flag = (num >= 11 AndAlso num <= 15)
  1317. If flag Then
  1318. result = WeaponHash.BullpupRifle
  1319. Else
  1320. flag = (num >= 16 AndAlso num <= 20)
  1321. If flag Then
  1322. result = CType(3231910285UI, WeaponHash) 'Native.WeaponHash.SpecialCarbine
  1323. Else
  1324. flag = (num >= 21 AndAlso num <= 23)
  1325. If flag Then
  1326. result = WeaponHash.SMG
  1327. Else
  1328. flag = (num >= 24 AndAlso num <= 26)
  1329. If flag Then
  1330. result = CType(4024951519UI, WeaponHash) 'Native.WeaponHash.AssaultSMG
  1331. Else
  1332. flag = (num >= 27 AndAlso num <= 29)
  1333. If flag Then
  1334. result = WeaponHash.HeavyShotgun
  1335. Else
  1336. flag = (num >= 30 AndAlso num <= 32)
  1337. If flag Then
  1338. result = CType(3800352039UI, WeaponHash) 'Native.WeaponHash.AssaultShotgun
  1339. Else
  1340. flag = (num >= 33 AndAlso num <= 35)
  1341. If flag Then
  1342. result = WeaponHash.SweeperShotgun
  1343. Else
  1344. flag = (num >= 36 AndAlso num <= 37)
  1345. If flag Then
  1346. result = WeaponHash.CombatMG
  1347. Else
  1348. flag = (num >= 38 AndAlso num <= 39)
  1349. If flag Then
  1350. result = WeaponHash.SniperRifle
  1351. Else
  1352. flag = (num >= 40 AndAlso num <= 42)
  1353. If flag Then
  1354. result = WeaponHash.HeavySniper
  1355. Else
  1356. flag = (num >= 41 AndAlso num <= 43)
  1357. If flag Then
  1358. result = CType(3342088282UI, WeaponHash) 'Native.WeaponHash.MarksmanRifle
  1359. Else
  1360. flag = (num >= 44 AndAlso num <= 46)
  1361. If flag Then
  1362. result = WeaponHash.Minigun
  1363. Else
  1364. flag = (num >= 47 AndAlso num <= 49)
  1365. If flag Then
  1366. result = WeaponHash.Pistol
  1367. Else
  1368. flag = (num >= 50 AndAlso num <= 53)
  1369. If flag Then
  1370. result = WeaponHash.CombatPistol
  1371. Else
  1372. flag = (num = 54)
  1373. If flag Then
  1374. result = WeaponHash.CombatPDW
  1375. Else
  1376. flag = (num = 55)
  1377. If flag Then
  1378. result = CType(2578377531UI, WeaponHash) 'Native.WeaponHash.Pistol50
  1379. Else
  1380. flag = (num = 56)
  1381. If flag Then
  1382. result = CType(3523564046UI, WeaponHash) 'Native.WeaponHash.HeavyPistol
  1383. Else
  1384. flag = (num = 57)
  1385. If flag Then
  1386. result = CType(3249783761UI, WeaponHash) 'Native.WeaponHash.Revolver
  1387. Else
  1388. flag = (num = 58)
  1389. If flag Then
  1390. result = CType(2726580491UI, WeaponHash) 'Native.WeaponHash.GrenadeLauncher
  1391. Else
  1392. flag = (num = 59)
  1393. If flag Then
  1394. result = WeaponHash.HomingLauncher
  1395. Else
  1396. flag = (num = 60)
  1397. If flag Then
  1398. result = WeaponHash.CompactGrenadeLauncher
  1399. Else
  1400. result = WeaponHash.PumpShotgun
  1401. End If
  1402. End If
  1403. End If
  1404. End If
  1405. End If
  1406. End If
  1407. End If
  1408. End If
  1409. End If
  1410. End If
  1411. End If
  1412. End If
  1413. End If
  1414. End If
  1415. End If
  1416. End If
  1417. End If
  1418. End If
  1419. End If
  1420. End If
  1421. End If
  1422. End If
  1423. End If
  1424. Return result
  1425. End Function
  1426.  
  1427. Private Function GetPedType(p As Ped) As ArmyAtSixDispatch.pedType
  1428. Try
  1429. Return CType([Function].[Call](Of Integer)(Hash._0xFF059E1E4C01E63C, New InputArgument() { p }), ArmyAtSixDispatch.pedType)
  1430. Catch ex As Exception
  1431. End Try
  1432. Return CType((-1), ArmyAtSixDispatch.pedType)
  1433. End Function
  1434.  
  1435. Private Function IsCop(p As Entity) As Boolean
  1436. Dim pedType As ArmyAtSixDispatch.pedType = Me.GetPedType(CType(p, Ped))
  1437. Return pedType = ArmyAtSixDispatch.pedType.Cop OrElse pedType = ArmyAtSixDispatch.pedType.Army OrElse pedType = ArmyAtSixDispatch.pedType.SWAT
  1438. End Function
  1439.  
  1440. Private Function GetSpawnPos(Optional pMinRandomDist As Double = 90.0F) As Vector3
  1441. Dim vector As Vector3 = Nothing
  1442. Dim flag As Boolean = Entity.Exists(Game.Player.Character.CurrentVehicle)
  1443. If flag Then
  1444. Me.latestCopCarHeading = CDbl((Game.Player.Character.CurrentVehicle.Heading + 180F))
  1445. Me.latestCopCarSpeed = CDbl(Game.Player.Character.CurrentVehicle.Speed)
  1446. Else
  1447. Me.latestCopCarHeading = CDbl((Game.Player.Character.Heading + 180F))
  1448. Me.latestCopCarSpeed = 5.0
  1449. End If
  1450. For Each ped As Ped In World.GetNearbyPeds(Game.Player.Character.GetOffsetInWorldCoords(Vector3.RelativeFront * 200F), 100F)
  1451. Try
  1452. Dim flag2 As Boolean = Entity.Exists(ped) AndAlso ped.IsAlive AndAlso Me.isCop(ped) AndAlso Entity.Exists(ped.CurrentVehicle) AndAlso Not Me.createdVehicles.Contains(ped.CurrentVehicle.Handle) AndAlso Not ped.CurrentVehicle.Model.IsHelicopter AndAlso Not ped.CurrentVehicle.Model.IsBoat
  1453. If flag2 Then
  1454. vector = ped.CurrentVehicle.Position
  1455. Me.copsGroup = ped.CurrentPedGroup
  1456. Me.latestCopCarHeading = CDbl(ped.CurrentVehicle.Heading)
  1457. Me.latestCopCarSpeed = CDbl(ped.CurrentVehicle.Speed)
  1458. End If
  1459. Catch ex As Exception
  1460. End Try
  1461. Next
  1462. Dim flag3 As Boolean = vector = Nothing
  1463. If flag3 Then
  1464. Dim direction As Vector3 = GameplayCamera.Direction
  1465. direction.Z = 0F
  1466. vector = Game.Player.Character.Position - direction * CSng(pMinRandomDist)
  1467. vector.Z = World.GetGroundHeight(vector) + 1F
  1468. vector = World.GetNextPositionOnStreet(vector)
  1469. End If
  1470.  
  1471. [Function].[Call](Hash._0xA56F01F3765B93A0, New InputArgument() { vector.X, vector.Y, vector.Z, 5F, True, False, True, False })
  1472. Return vector
  1473. End Function
  1474.  
  1475. Private Function GetHeliSpawnPos(Optional pMinRandomDist As Double = 180.0) As Vector3
  1476. Dim vector As Vector3 = Nothing
  1477. Dim flag As Boolean = Entity.Exists(Game.Player.Character.CurrentVehicle)
  1478. If flag Then
  1479. Me.latestCopCarHeading = CDbl((Game.Player.Character.CurrentVehicle.Heading + 180F))
  1480. Me.latestCopCarSpeed = CDbl(Game.Player.Character.CurrentVehicle.Speed)
  1481. Else
  1482. Me.latestCopCarHeading = CDbl((Game.Player.Character.Heading + 180F))
  1483. Me.latestCopCarSpeed = 5.0
  1484. End If
  1485.  
  1486. For Each ped As Ped In World.GetNearbyPeds(Game.Player.Character.GetOffsetInWorldCoords(Vector3.RelativeFront * 200F), 100F)
  1487. Try
  1488. Dim flag2 As Boolean = Entity.Exists(ped) AndAlso ped.IsAlive AndAlso Me.isCop(ped) AndAlso Entity.Exists(ped.CurrentVehicle) AndAlso Not Me.createdVehicles.Contains(ped.CurrentVehicle.Handle)
  1489. If flag2 Then
  1490. vector = ped.CurrentVehicle.Position
  1491. Me.copsGroup = ped.CurrentPedGroup
  1492. Me.latestCopCarHeading = CDbl(ped.CurrentVehicle.Heading)
  1493. Me.latestCopCarSpeed = CDbl(ped.CurrentVehicle.Speed)
  1494. End If
  1495. Catch ex As Exception
  1496. End Try
  1497. Next
  1498. Dim flag3 As Boolean = vector = Nothing
  1499. If flag3 Then
  1500. Dim direction As Vector3 = GameplayCamera.Direction
  1501. direction.Z = 0F
  1502. vector = (Game.Player.Character.Position - direction * CSng(pMinRandomDist)).Around(50.0F)
  1503. End If
  1504.  
  1505. vector.Z = Math.Max(Game.Player.Character.Position.Z + 50.0F, 50.0F)
  1506. [Function].[Call](Hash._0xA56F01F3765B93A0, New InputArgument() { vector.X, vector.Y, vector.Z, 5F, True, False, True, False })
  1507. Return vector
  1508. End Function
  1509.  
  1510. Private Function GetSpawnPosInWater(Optional pMinRandomDist As Double = 180.0F) As Vector3
  1511. Dim vector As Vector3 = Nothing
  1512. Dim flag As Boolean = Entity.Exists(Game.Player.Character.CurrentVehicle)
  1513. If flag Then
  1514.  
  1515. Me.latestCopCarHeading = CDbl((Game.Player.Character.CurrentVehicle.Heading + 180.0F))
  1516. Me.latestCopCarSpeed = CDbl(Game.Player.Character.CurrentVehicle.Speed)
  1517. Else
  1518. Me.latestCopCarHeading = CDbl((Game.Player.Character.Heading + 180.0F))
  1519. Me.latestCopCarSpeed = 5.0
  1520. End If
  1521.  
  1522. For Each ped As Ped In World.GetNearbyPeds(Game.Player.Character.GetOffsetInWorldCoords(Vector3.RelativeFront * 200F), 100F)
  1523. Try
  1524. Dim flag2 As Boolean = Entity.Exists(ped) AndAlso ped.IsAlive AndAlso Me.isCop(ped) AndAlso Entity.Exists(ped.CurrentVehicle) AndAlso Not Me.createdVehicles.Contains(ped.CurrentVehicle.Handle) AndAlso (ped.CurrentVehicle.IsInWater OrElse ped.CurrentVehicle.Model.IsBoat)
  1525. If flag2 Then
  1526. vector = ped.CurrentVehicle.Position
  1527. Me.copsGroup = ped.CurrentPedGroup
  1528. Me.latestCopCarHeading = CDbl(ped.CurrentVehicle.Heading)
  1529. Me.latestCopCarSpeed = CDbl(ped.CurrentVehicle.Speed)
  1530. End If
  1531. Catch ex As Exception
  1532. End Try
  1533. Next
  1534. Dim flag3 As Boolean = vector = Nothing
  1535. If flag3 Then
  1536. Dim direction As Vector3 = GameplayCamera.Direction
  1537. direction.Z = 0F
  1538. vector = (Game.Player.Character.Position - direction * CSng(pMinRandomDist)).Around(50F)
  1539. Dim flag4 As Boolean = World.GetGroundHeight(vector) > -2F
  1540. If flag4 Then
  1541. vector = Nothing
  1542. End If
  1543. End If
  1544. [Function].[Call](Hash._0xA56F01F3765B93A0, New InputArgument() { vector.X, vector.Y, vector.Z, 5F, True, False, True, False })
  1545. Return vector
  1546. End Function
  1547.  
  1548. Private Sub ResetScriptState()
  1549. Me.bSixstars = False
  1550. Me.crimes = 0
  1551. Me.damagedPeds.Clear()
  1552. Me.copsGroup = Nothing
  1553. Me.relationshipGroup = Nothing
  1554. Me.bLoadAnimatedGif = True
  1555. Me.animatedGifFiles_1.Clear()
  1556. Me.animatedGifFiles_currentImages.Clear()
  1557. Me.latestCopCarHeading = 0.0
  1558. Me.latestCopCarSpeed = 0.0
  1559. Me.createdVehicles.Clear()
  1560. Me.createdEntities.Clear()
  1561. End Sub
  1562.  
  1563. Private myRandomSource As Random
  1564.  
  1565. Private bSixStars As Boolean
  1566.  
  1567. Private crimes As Integer
  1568.  
  1569. Private timerCheckKilledPeds As DateTime
  1570.  
  1571. Private damagedPeds As List(Of Integer)
  1572.  
  1573. Private timerDispatch As DateTime
  1574.  
  1575. Private copsGroup As PedGroup
  1576.  
  1577. Private relationshipGroup As PedGroup
  1578.  
  1579. Private bLoadAnimatedGif As Boolean
  1580.  
  1581. Private animatedGifFiles_1 As List(Of String)
  1582.  
  1583. Private animatedGig_timerNextImage As DateTime
  1584.  
  1585. Private animatedGifFiles_currentImages As List(Of String)
  1586.  
  1587. Private timerShowWNews As Date
  1588.  
  1589. Private bShowWNews As Boolean = False
  1590.  
  1591. Private latestCopCarHeading As Double
  1592.  
  1593. Private latestCopCarSpeed As Double
  1594.  
  1595. Private createdVehicles As List(Of Integer)
  1596.  
  1597. Private createdEntities As List(Of Entity)
  1598.  
  1599. Public Enum pedType
  1600. Player = 1
  1601. Male = 4
  1602. Female = 5
  1603. Cop = 6
  1604. Human = 26
  1605. SWAT = 27
  1606. Animal = 28
  1607. Army = 29
  1608. End Enum
  1609. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement