Advertisement
julioCCs

BasicScript10.vb

Nov 7th, 2012
803
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 3.16 KB | None | 0 0
  1. Imports System ' basic imports
  2. Imports GTA ' basic imports
  3. Imports System.Windows.Forms ' needed to have access to "keys" enumeration, for example
  4. Imports System.Drawing ' needed to handle colors referencing the color name, ex: myCar.color = System.Drawing.Color.Black
  5.  
  6. Public Class BasicScript
  7.     Inherits Script
  8.    
  9.     private v as vehicle = nothing
  10.        
  11.     Public Sub New()
  12.         Me.interval = 10
  13.     End Sub
  14.    
  15.     private sub msg(sMsg as string, time as int32)
  16.         Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", sMsg, time, 1)
  17.     end sub
  18.    
  19.     Private Sub keyDown(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyDown
  20.         if e.key = keys.d1 then
  21.             player.character.euphoria.armsWindMill.DisableOnImpact = false
  22.             player.character.euphoria.armsWindMill.start(1000)
  23.         end if
  24.        
  25.         if e.key = keys.d2 then
  26.             player.character.euphoria.BeingShot.start(1000)
  27.         end if
  28.        
  29.         if e.key = keys.d3 then
  30.             player.character.euphoria.BodyBalance.damping = 1.0
  31.             player.character.euphoria.BodyBalance.maxsteps = 10
  32.             player.character.euphoria.BodyBalance.Stiffness = 10.0
  33.             player.character.euphoria.BodyBalance.start(1000)
  34.         end if
  35.        
  36.         if e.key = keys.d4 then
  37.             player.character.euphoria.LeanToPosition.start(5000)
  38.         end if
  39.        
  40.         if e.key = keys.d5 then
  41.             player.character.euphoria.PedalLegs.start(5000)
  42.         end if
  43.        
  44.         if e.key = keys.lbutton then
  45.             dim v as vehicle = world.getclosestvehicle(player.character.position, 5.0)
  46.            
  47.             if exists(v) andalso player.character.isTouching(v) then
  48.                 player.character.euphoria.Grab.ItemToGrab = v
  49.                 player.character.euphoria.Grab.GrabDistance = 1.0
  50.                 player.character.euphoria.Grab.GrabMethod = euphoria.GrabMethod.Surface
  51.                 player.character.euphoria.Grab.GrabStrength = 100.0
  52.                 player.character.euphoria.Grab.DontLetGo = true
  53.                 player.character.euphoria.Grab.UseLeftHand = true
  54.                 player.character.euphoria.Grab.UseRightHand = true
  55.                 player.character.euphoria.Grab.start()
  56.             end if
  57.         end if
  58.        
  59.         if e.key = keys.d0 then player.character.isragdoll = false
  60.     End Sub
  61.     Private Sub keyUp(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyUp
  62.     end sub
  63.        
  64.     Private Sub general_tick(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Tick
  65.         if exists(player.character.currentvehicle) then
  66.             for each p as ped in world.getpeds(player.character.currentvehicle.position, 6.0)
  67.                 if exists(p) andalso not p.metadata.grab andalso (p <> player.character) andalso (p.istouching(player.character.currentvehicle)) andalso not p.euphoria.Grab.isGrabbed then
  68.                     p.euphoria.Grab.ItemToGrab = player.character.currentvehicle
  69.                     p.euphoria.Grab.GrabDistance = 1.0
  70.                     p.euphoria.Grab.GrabMethod = euphoria.GrabMethod.Surface
  71.                     p.euphoria.Grab.GrabStrength = 1000.0
  72.                     p.euphoria.Grab.DontLetGo = true
  73.                     p.euphoria.Grab.UseLeftHand = true
  74.                     p.euphoria.Grab.UseRightHand = true
  75.                     p.euphoria.Grab.start(10000)
  76.                     p.invincible = true
  77.                    
  78.                     p.metadata.grab = true
  79.                 end if
  80.                
  81.                 if exists(p) andalso p.metadata.grab andalso not p.euphoria.Grab.isGrabbed then p.euphoria.Grab.start(10000)
  82.             next
  83.         end if
  84.     end sub        
  85. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement