Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'http://www.facebook.com/GtaIVScripting
- 'https://www.youtube.com/user/GTAScripting
- Imports System ' basic imports
- Imports GTA ' basic imports
- Imports System.Windows.Forms ' needed to have access to "keys" enumeration, for example
- Imports System.Drawing ' needed to handle colors referencing the color name, ex: myCar.color = System.Drawing.Color.Black
- Public Class BasicScript2
- Inherits Script
- Public Sub New()
- Me.interval = 10
- End Sub
- private sub msg(sMsg as string, time as int32)
- Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", sMsg, time, 1)
- end sub
- Private Sub keyDown(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyDown
- if (e.key = keys.d1) andalso exists(Game.GetWaypoint) then
- dim myPed as ped
- dim myVeh as vehicle
- myPed = World.CreatePed(player.character.position.around(5.0))
- myVeh = world.createvehicle("MAVERICK", player.character.position.around(5.0))
- if not exists(myPed) orelse not exists(myVeh) then
- msg("Error", 2000)
- exit sub
- end if
- myPed.task.EnterVehicle(myVeh, VehicleSeat.Driver)
- player.character.task.EnterVehicle(myVeh, VehicleSeat.LeftRear)
- while (not myPed.isInVehicle orelse not player.character.isInVehicle) andalso not game.iskeypressed(keys.space)
- wait(200)
- msg("waiting...", 200)
- end while
- myPed.task.DriveTo(Game.GetWaypoint.Position.toground, 200, true, true)
- 'myPed.task.CruiseWithVehicle(myVeh, 200, true) - dont worked with helicopter, only with car
- end if
- End Sub
- Private Sub keyUp(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyUp
- end sub
- Private Sub general_tick(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Tick
- end sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement