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 BasicScript
- 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) then
- dim vList as vehicle()
- dim v as vehicle
- vList = world.GetVehicles(player.character.position, 10.0)
- for each v in vList
- if exists(v) then v.applyforce(vector3.worldup * 20)
- next
- end if
- if (e.key = keys.d2) then
- dim pList as ped()
- dim p as ped
- pList = world.GetPeds(player.character.position, 10.0)
- for each p in pList
- if exists(p) andalso (p <> player.character) then
- p.isonfire = true
- p.isragdoll = true
- end if
- next
- end if
- if (e.key = keys.d3) then
- dim oList as gta.object()
- dim o as gta.object
- oList = world.GetAllObjects
- for each o in oList
- if exists(o) then
- o.detach
- o.applyforce(vector3.worldup * 20)
- end if
- next
- 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
- if player.character.isInMeleeCombat then
- for each p as ped in world.GetPeds(player.character.position, 10.0)
- if exists(p) andalso (p <> player.character) andalso native.function.call(of boolean)("HAS_CHAR_BEEN_DAMAGED_BY_CHAR", p, player.character) then
- p.isragdoll = true
- p.velocity = vector3.worldup * 5
- native.function.call("CLEAR_CHAR_LAST_DAMAGE_ENTITY", p)
- end if
- next
- end if
- if player.character.isShooting then
- for each p as ped in world.GetPeds(player.character.position + player.character.direction * 50, 50.0)
- if exists(p) andalso (p <> player.character) andalso native.function.call(of boolean)("HAS_CHAR_BEEN_DAMAGED_BY_CHAR", p, player.character) then
- p.isragdoll = true
- p.velocity = vector3.worldup * 5
- native.function.call("CLEAR_CHAR_LAST_DAMAGE_ENTITY", p)
- end if
- next
- for each v as vehicle in world.GetVehicles(player.character.position + player.character.direction * 50, 50.0)
- if exists(v) andalso native.function.call(of boolean)("HAS_CAR_BEEN_DAMAGED_BY_CHAR", v, player.character) then
- v.applyforce(vector3.worldup * 5)
- native.function.call("CLEAR_CAR_LAST_DAMAGE_ENTITY", v)
- end if
- next
- player.character.health += 20
- end if
- end sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement