Jump to content

[HELP] Question


1LoL1

Recommended Posts

This will round numbers to 10ths. In other words, 0.1, 25.9, 56.2, etc...

sx, sy, sz = getElementVelocity (getPedOccupiedVehicle(localPlayer)) 
speed = round(((sx^2 + sy^2 + sz^2)^(0.5))*180, 1) 

Or, if you want just integers

sx, sy, sz = getElementVelocity (getPedOccupiedVehicle(localPlayer)) 
speed = round(((sx^2 + sy^2 + sz^2)^(0.5))*180, 0) 

Link to comment
This will round numbers to 10ths. In other words, 0.1, 25.9, 56.2, etc...
sx, sy, sz = getElementVelocity (getPedOccupiedVehicle(localPlayer)) 
speed = round(((sx^2 + sy^2 + sz^2)^(0.5))*180, 1) 

Or, if you want just integers

sx, sy, sz = getElementVelocity (getPedOccupiedVehicle(localPlayer)) 
speed = round(((sx^2 + sy^2 + sz^2)^(0.5))*180, 0) 

Not work it's same what i had.

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