Jump to content

Velocity script


Sasu

Recommended Posts

function mostrar() 
if isPedInVehicle(getLocalPlayer()) then 
local vehicle = getPedOccupiedVehicle(getLocalPlayer()) 
local velocity = getVelocityPerKilometre( vehicle ) 
local maxVelocity = getVehicleHandling(Vehicle)["maxVelocity"] 
local count = 100/maxVelocity 
local finalProgress = count*velocity 
guiSetText(velocity, "KM/H: "..velocity) 
guiProgressBarSetProgress(barra, tonumber(finalProgress)) 
end 
end 
addEventHandler("onClientRender", root, mostrar) 

Error on debug:

At line 5: Bad argument @ 'getVehicleHandling'

At line 5: attempt to index a boolean value

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...