Hello, I'm trying to get the same value as the GetVehicleForwardSpeed function but on the server side, but by the way, the velocity doesn't work very well.
Code:
local speed = math.tointeger(math.floor(GetVehicleForwardSpeed(GetPlayerVehicle())))
AddPlayerChat("Speed: "..speed.." km/h")
local x, y, z = GetVehicleVelocity(GetPlayerVehicle())
x = math.abs(x)
y = math.abs(y)
z = math.abs(z)
local hmh = math.floor((190*math.abs(x+y+z))/ 5320.7950973511)
AddPlayerChat("Velocity: "..hmh)
AddPlayerChat("------------------------------")

Comment