Advertisement
julioCCs

EmergencyServices(not working)

Dec 21st, 2012
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.19 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 basicscriot
  7.     Inherits Script
  8.    
  9.     Public Sub New()
  10.         Me.interval = 10       
  11.     End Sub
  12.    
  13.     private sub msg(sMsg as string, time as int32)
  14.         Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", sMsg, time, 1)
  15.     end sub
  16.    
  17.     Private Sub keyDown(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyDown
  18.         if (e.key = keys.numpad0) then
  19.             dim pos as vector3 ' declares an variable of type 3D position
  20.             dim m as model ' creates an variable of type Model
  21.            
  22.             pos = player.character.position.around(5).toground ' get an position around the player and set to the variable POS
  23.             m = new model("ambulance") ' creates a new Ambulance model         
  24.            
  25.             if native.function.call(of boolean)("CREATE_EMERGENCY_SERVICES_CAR", m.hash, pos.x, pos.y, pos.z) then
  26.                 msg("done", 1000) ' ok
  27.             else           
  28.                 msg("error", 1000) ' problem
  29.             end if
  30.         end if
  31.     End Sub
  32. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement