GET_VEHICLE_ESTIMATED_MAX_SPEED
0x53AF99BAA671CA47
0x7D1A0616
// GetVehicleEstimatedMaxSpeed
float GET_VEHICLE_ESTIMATED_MAX_SPEED(Vehicle vehicle);
Returns: Returns the estimated maximum speed of the specified vehicle as a float number.
Retrieves a static value representing the estimated max speed of a specific vehicle, including any vehicle mods. This value does not change dynamically during gameplay.
NativeDB Introduced: v323
Old name: _GET_VEHICLE_MAX_SPEED
Examples:
-- This example prints the estimated max speed of the player's current vehicle.
-- Retrieve the player ped.
local playerPed = PlayerPedId()
-- Retrieve the vehicle the player is currently in.
local vehicle = GetVehiclePedIsIn(playerPed, false)
-- If the vehicle does not exist, end the execution of the code here.
if not DoesEntityExist(vehicle) then
return
end
-- Retrieve the estimated max speed of the vehicle.
local estimatedMaxSpeed = GetVehicleEstimatedMaxSpeed(vehicle)
-- Print the estimated max speed of the vehicle.
print("Estimated Max Speed: " .. estimatedMaxSpeed)