Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:1.30

Description

Description:

Sets a vehicle maximum reachable speed (in ideal conditions, smooth roads).

The set limit can exceed the vehicle maximum speed, as defined in its configuration.

In V3.6+, the limit can also be applied to helicopters, but as the limiting mechanism (raised nose) only works in certain circumstances, it is still possible to exceed the defined limit in certain flight situations.

Syntax

Syntax:vehicle setMaxSpeedLimit limit
Parameters:
  • vehicle: Object - Vehicle to which the speed limit is applied to.
  • limit: Number - Approximate maximum limit in km/h. If set to <=0, the original limit from the vehicle configuration is used.
Return Value:Nothing

Examples

Examples:
(vehicle player) setMaxSpeedLimit 20;

Additional Information

See also: getMaxSpeedLimit, forceSpeed, limitSpeed, setSpeedMode
Multiplayer:
Problems:

Notes