Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- Imports System.IO.StreamWriter ' if you want vb application form functions (if that is a fucntion) ???
- Public Class BasicScript2
- Inherits Script
- ' here we have the ped declaration and an call of getclos... that can return a ped
- ' but uit will be executed in the start of hte script, and we need to get the ped when we press 0, so we can remove the method from here
- Private myped As Ped
- Public Sub New()
- Me.Interval = 10
- End Sub
- Private Sub msg(ByVal sMsg As String, ByVal time As int32)
- Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", sMsg, time, 1)
- End Sub
- Shadows Sub keyDown(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyDown
- If e.Key = Keys.D1 Then
- Player.Character.ApplyForce(Vector3.WorldUp * 30)
- End If
- ' If Player.Character.isInAir Then
- 'Player.Character.ApplyForce(Vector3.WorldUp * 30)
- 'If e.Key = Keys.W Then
- 'Player.Character.ApplyForce(Player.Character.Direction * 600)
- ' End If
- ' End If
- ' the problem is that you are using a method here, you can set nothing to a method
- ' only to variables, what you need its use the () to determine the params
- ' no, what you mneed to do its see what you need , the Type of the param
- ' look at the Bold words, we need a vector3, the position in the world
- ' the ped as a position property look, now the Radius
- If e.Key = Keys.D0 Then
- myped = Nothing ' here we reset to nothing
- myped = World.GetClosestPed(Player.Character.Position, 6.0) ' try to find
- If Exists(myped) Then ' if found
- msg("Found a stinkin ped", 3000)
- myped.PreventRagdoll = False ' disable the prevent ragdoll, that can avoid the ragdoll state
- myped.isRagdoll = True ' set to ragdoll
- myped.AttachBlip() ' add a blip
- ' lets see
- Else : msg("not found", 2000)
- End If
- End If
- ' done
- 'well, here what you are doing its calling a method that will try to find a ped but
- 'you need a variable to store this ped, otherwise you will not be able to use it
- If Game.isGameKeyPressed(GameKey.Jump) Then
- Player.Character.ApplyForce(Vector3.WorldUp * 500)
- Player.Character.ApplyForce(Player.Character.Direction * 500)
- End If
- End Sub
- Shadows 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 Exists(myped) Then
- myped.Velocity = Vector3.Zero
- 'i didnt swa that question, my connection was lost
- ' the vectotr3.zero its 0 0 0 for x y and z
- ' this will make the ped just stop in air
- ' like no gravity
- ' try it
- msg("float bab", 3000)
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement