Skip to main content

Entity::setMaxSpeed

Syntax​

```js entity.setMaxSpeed(speed); ```

Required Arguments​

  • speed: <b><font color='green'>float</font></b>

Return value​

  • Undefined

Example​

```js let vehicle = mp.players.local.vehicle

let speed = vehicle.getSpeed(); // Getting vehicle speed.

vehicle.setMaxSpeed(speed) // Sets the vehicle maximum speed the speed that we got. ```

See also​