Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'http://gtaxscripting.blogspot.com/
- '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 DelorianEffectFirstTry
- Inherits Script
- private timeCont as int16 = 0
- private myFX1, myFX2, myFX3, myFX4 as int32
- private bPlaySound as boolean = true
- 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
- End Sub
- Private Sub keyUp(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyUp
- end sub
- 'ambient_flies_sparked
- 'ambient_electrical_sparks
- 'break_electrical
- 'break_sparks
- 'dest_lightbulb_on
- 'exp_vehicle_air
- Private Sub general_tick(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Tick
- if exists(player.character.currentvehicle) then
- if player.character.currentvehicle.speed > 30 then
- dim pos as vector3 = player.character.currentvehicle.position
- player.character.currentvehicle.visible = false
- player.character.visible = false
- player.character.currentvehicle.applyforce(player.character.currentvehicle.velocity * -1)
- for c as int16 = 5 to 30
- world.startfire((pos + player.character.direction * c).around(1).toground)
- world.startfire((pos + player.character.direction * c).around(1).toground)
- next
- dim myCam as camera = new camera
- myCam.position = game.defaultcamera.position
- myCam.rotation = game.defaultcamera.rotation
- myCam.fov = game.defaultcamera.fov
- myCam.activate
- native.function.call("START_PTFX", "dest_lightbulb_on", pos.x, pos.y, pos.z + 1, 0, 0, 0, 3.0)
- native.function.call("START_PTFX", "break_electrical", pos.x, pos.y, pos.z + 1, 0, 0, 0, 3.0)
- wait(2000)
- myCam.deactivate
- World.CurrentDayTime = new System.TimeSpan(World.CurrentDayTime.hours - 10, World.CurrentDayTime.minutes, World.CurrentDayTime.seconds)
- player.character.currentvehicle.applyforce(player.character.currentvehicle.direction * 20)
- for c as int16 = 1 to 5
- native.function.call("STOP_PTFX", myFX1)
- native.function.call("STOP_PTFX", myFX2)
- myFX1 = native.function.call(of int32)("START_PTFX_ON_VEH", "ambient_flies_sparked", player.character.currentvehicle, 0.8, 2.4, 0, -90.0, 90.0, 90.0, 1.0 * (player.character.currentvehicle.speed / 25))
- myFX2 = native.function.call(of int32)("START_PTFX_ON_VEH", "ambient_flies_sparked", player.character.currentvehicle, -0.8, 2.4, 0, -90.0, 90.0, 90.0, 1.0 * (player.character.currentvehicle.speed / 25))
- wait(100)
- next
- native.function.call("STOP_PTFX", myFX1)
- native.function.call("STOP_PTFX", myFX2)
- player.character.currentvehicle.visible = true
- player.character.visible = true
- elseif player.character.currentvehicle.speed > 25 then
- if timeCont mod 50 = 0 then
- native.function.call("STOP_PTFX", myFX1)
- native.function.call("STOP_PTFX", myFX2)
- native.function.call("STOP_PTFX", myFX3)
- native.function.call("STOP_PTFX", myFX4)
- myFX1 = native.function.call(of int32)("START_PTFX_ON_VEH", "ambient_flies_sparked", player.character.currentvehicle, 0.8, 2.4, 0, -90.0, 90.0, 90.0, 1.0 * (player.character.currentvehicle.speed / 25))
- myFX2 = native.function.call(of int32)("START_PTFX_ON_VEH", "ambient_flies_sparked", player.character.currentvehicle, -0.8, 2.4, 0, -90.0, 90.0, 90.0, 1.0 * (player.character.currentvehicle.speed / 25))
- myFX3 = native.function.call(of int32)("START_PTFX_ON_VEH", "ambient_flies_sparked", player.character.currentvehicle, 0.8, 1.0, 0.35, -90.0, 90.0, 90.0, 1.0 * (player.character.currentvehicle.speed / 25))
- myFX4 = native.function.call(of int32)("START_PTFX_ON_VEH", "ambient_flies_sparked", player.character.currentvehicle, -0.8, 1.0, 0.35, -90.0, 90.0, 90.0, 1.0 * (player.character.currentvehicle.speed / 25))
- if bPlaySound then
- bPlaySound = false
- playsound(".\Scripts\Delorian.wav")
- end if
- end if
- else
- bPlaySound = true
- end if
- end if
- timeCont += me.interval
- if timeCont > 1000 then timeCont = 0
- end sub
- Private Sub PlaySound(ByVal sFile)
- Try
- Dim Sound As New System.Media.SoundPlayer()
- Sound.SoundLocation = sFile
- Sound.Load()
- Sound.Play()
- Catch
- End Try
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement