Jump to content

RESOURCE "VEHJUMP"


Mike269

Recommended Posts

well he's my friend from game so i'll help him

function jump()       
    local vehicle = getPedOccupiedVehicle(getLocalPlayer()) 
    if (isVehicleOnGround( vehicle ) == true) then           
        local sx,sy,sz = getElementVelocity ( vehicle ) 
        setElementVelocity( vehicle ,sx, sy, sz+0.35 ) 
    end 
end 
bindKey ( "lshift","down", jump) 

Link to comment
why you posted the same reply twice?

https://community.multitheftauto.com/ind ... ls&id=7406

It happens sometimes if you have the same thread open in different tabs or whatever, I've done the same mistake myself a few times.

@OP: This is what checks if you're on the ground, and if you are you can jump - otherwise not.

if (isVehicleOnGround( vehicle ) == true) then           
    local sx,sy,sz = getElementVelocity ( vehicle ) 
    setElementVelocity( vehicle ,sx, sy, sz+0.35 ) 
end 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...