Advertisement
julioCCs

BasicScript3.vb

Oct 25th, 2012
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 2.15 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 myCam as camera = nothing
  10.    
  11.     Public Sub New()
  12.         Me.interval = 10
  13.        
  14.         myCam = new camera
  15.     End Sub
  16.    
  17.     private sub msg(sMsg as string, time as int32)
  18.         Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", sMsg, time, 1)
  19.     end sub
  20.    
  21.     Private Sub keyDown(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyDown
  22.         if (e.key = keys.d1) then
  23.             myCam.position = game.currentcamera.position
  24.             myCam.rotation = game.currentcamera.rotation
  25.             myCam.activate
  26.         end if
  27.  
  28.         if (e.key = keys.d2) then
  29.             myCam.deactivate
  30.         end if     
  31.        
  32.         if e.key = keys.d0 then
  33.             player.character.weapons.MP5.ammo = 50
  34.             player.character.weapons.RocketLauncher.ammo = 50
  35.             player.character.weapons.RocketLauncher.select
  36.         end if
  37.        
  38.         if e.key = keys.d9 then
  39.             dim aSet as AnimationSet
  40.            
  41.             aSet = new AnimationSet("jump_std")
  42.            
  43.             player.character.animation.play(aSet, "jump_land_roll", 1.0, AnimationFlags.Unknown01)
  44.            
  45.             wait(100)
  46.            
  47.             while player.character.animation.isPlaying(aSet, "jump_land_roll")
  48.                 msg(player.character.animation.GetCurrentAnimationTime(aSet, "jump_land_roll").tostring, 100)
  49.                
  50.                 if player.character.animation.GetCurrentAnimationTime(aSet, "jump_land_roll") > 0.2 then player.character.task.clearallimmediately
  51.                
  52.                 wait(10)
  53.             end while
  54.         end if
  55.     End Sub
  56.     Private Sub keyUp(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyUp
  57.     end sub
  58.    
  59.     Private Sub general_tick(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Tick
  60.         if myCam.isactive then
  61.             myCam.rotation = game.defaultcamera.rotation
  62.            
  63.             if game.iskeypressed(keys.numpad8) then
  64.                 myCam.position += myCam.direction
  65.             elseif game.iskeypressed(keys.numpad2) then
  66.                 myCam.position -= myCam.direction
  67.             end if
  68.         end if
  69.     end sub
  70. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement