GetVehicleMaxSpeed

From GT-MP
Jump to: navigation, search
GetVehicleMaxSpeed
Shared Function
Utilities-terminal.png Server-Side System-users.png Client-Side
Csharp.png C# Javascript.png JavaScript

Returns the maximal speed of a vehicle in m/s.

Syntax

API.getVehicleMaxSpeed(VehicleHash model);

Required Arguments

  • model: parameter input should be in VehicleHash type.

NOTE: This function returns data in float type.

Usage example(s)

Example Description

Converting to MPH formula should be something like:

float maxSpeed = API.getVehicleMaxSpeed(model) * 2.23694f;

Converting to KMPH formula should be something like:

float maxSpeed  = API.getVehicleMaxSpeed(model) * 3.6f;


References