Advertisement
julioCCs

BasicScript5.vb

Oct 27th, 2012
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.21 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 myFX as int32
  10.    
  11.     Public Sub New()
  12.         Me.interval = 10
  13.        
  14.         player.character.makeproofto(false, true, false, false, false)
  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.             myFX = native.function.call(of int32)("START_PTFX_ON_PED_BONE", "ambient_fire_generic", player.character, 0, 0, 0, 0, 0, 0, Bone.Neck, 3.0)
  24.         end if
  25.        
  26.         if e.key = keys.d2 then
  27.             native.function.call("STOP_PTFX", myFX)
  28.         end if
  29.     End Sub
  30.     Private Sub keyUp(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyUp    
  31.     end sub
  32.    
  33.     Private Sub general_tick(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Tick
  34.     end sub
  35. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement