Jump to content

getVehicleSpeed help


Recommended Posts

why deosn't working?

 

addEventHandler("onClientElementColShapeHit", root,
    function(hitElement, matchingDimension)
        if hitElement == localPlayer and getElementType(source) == "vehicle" then
            local vehicleID = getElementModel(source)
            local speedX, speedY, speedZ = getElementVelocity(source)
            local actualSpeed = (speedX^2 + speedY^2 + speedZ^2)^(0.5)
	        local Limit = 1
            local kmh = actualSpeed * 180
outputChatBox(kmh)
            if not disableVehs[vehicleID] then
                if kmh < Limit then
                    outputChatBox("d")
                end
            end
        end
    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...