Advertisement
Vraciu

Save Peds In list

Dec 29th, 2015
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.58 KB | None | 0 0
  1. Imports System
  2. Imports System.Drawing
  3. Imports System.Windows.Forms
  4. Imports GTA
  5. Imports GTA.Math
  6. Imports System.IO
  7. Imports System.Text
  8. Imports System.Math
  9. Imports Controls
  10.  
  11.  
  12. Public Class BaseScript
  13.     Inherits Script
  14.  
  15.     Private unluckyPeds As New List(Of Ped)
  16.     Private ped As Model = New Model(Native.PedHash.Armymech01SMY)
  17.     Public Sub New()
  18.         Me.Interval = 5
  19.  
  20.  
  21.     End Sub
  22.  
  23.         Private Sub keyDown(ByVal sender As Object, ByVal e As KeyEventArgs) Handles MyBase.KeyDown
  24.     End Sub
  25.  
  26.     Private Sub keyUp(ByVal sender As Object, ByVal e As KeyEventArgs) Handles MyBase.KeyUp
  27.  
  28.         If e.KeyCode = Keys.N Then
  29.                 Dim onePed As Ped = Game.Player.GetTargetedEntity()
  30.                 unluckyPeds.Add(onePed)
  31.                 If unluckyPeds.Count + 1 Then
  32.                 UI.ShowSubtitle("Ped Saved", 100)
  33.                 End If
  34.         End If
  35.  
  36.  
  37.         If e.KeyCode = Keys.B AndAlso unluckyPeds.Count > 1 Then
  38.             For i As Integer = 0 To unluckyPeds.Count - 1
  39.                 'unluckyPeds(i).Kill()
  40.                 'unluckyPeds(i).Task.Jump()
  41.                 World.AddExplosion(unluckyPeds(i).Position, ExplosionType.Blimp, 100, 1)
  42.             Next
  43.  
  44.         End If
  45.  
  46.     End Sub
  47.  
  48.     Private Sub general_tick(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Tick
  49.  
  50.         If unluckyPeds.Count > 5 Then
  51.             For i As Integer = 0 To unluckyPeds.Count - 1
  52.                 unluckyPeds.RemoveAt(i)
  53.                 UI.ShowSubtitle("Peds Deleted", 1000)
  54.             Next
  55.  
  56.         End If
  57.  
  58.  
  59.     End Sub
  60. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement