Advertisement
julioCCs

theBasicScriptSample

Feb 26th, 2013
697
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 2.01 KB | None | 0 0
  1. 'http://gtaxscripting.blogspot.com/
  2. 'http://www.facebook.com/GtaIVScripting
  3. 'https://www.youtube.com/user/GTAScripting
  4.  
  5. ' observation, this is an non-working sample :)
  6.  
  7. Imports System
  8. Imports GTA
  9.  
  10. Public Class myBasicScript
  11.     Inherits Script
  12.  
  13.     Private myGlobalVariable As Double
  14.     Private myGlobalVariableAUx As Double = 100
  15.     Private textureTest As Texture
  16.  
  17.     Private Class myCustomClass
  18.         Private anClassPrivateVariable As Int16
  19.         Public anClassPublicVariable As Int16
  20.     End Class
  21.  
  22.     Public Sub New()
  23.         Me.Interval = 10
  24.     End Sub
  25.  
  26.     Private Sub keyDown(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyDown
  27.     End Sub
  28.  
  29.     Private Sub keyUp(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyUp
  30.     End Sub
  31.  
  32.     Private Sub general_tick(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Tick
  33.     End Sub
  34.  
  35.     Private Sub console_CMD(ByVal sender As Object, ByVal e As ConsoleEventArgs) Handles MyBase.ConsoleCommand
  36.     End Sub
  37.  
  38.     Private Sub GraphicsEventHandler(ByVal sender As Object, ByVal e As GTA.GraphicsEventArgs) Handles MyBase.PerFrameDrawing
  39.         e.Graphics.DrawText("my text inside the PerFrameDrawing event", 10, 10)
  40.     ' draw the text starting at 10, 10 (X, Y screen position)
  41.  
  42.         e.Graphics.DrawLine(10, 20, 100, 20, 1, Color.Red)
  43.     ' draw an line starting at 10, 20, ending at 100, 20, with 1of width and red color
  44.  
  45.         e.Graphics.DrawRectangle(100, 100, 200, 200, color.FromArgb(100, 255, 255, 255))
  46.     ' draw an rectangle with center at 100, 100, with 200 of width, 200 of height and with semi transparent white color
  47.  
  48.         e.Graphics.DrawSprite(textureTest, 300, 300, 100, 100, 0)
  49.     ' draw an texture with center at 300, 300, with 100 of widht, 100 of height and 0 of rotation
  50.     End Sub
  51.  
  52.     Private Sub msg(ByVal sMsg As String, ByVal time As Int32)
  53.         Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", sMsg, time, 1)
  54.     End Sub
  55. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement