Entity::setMaxSpeed: Difference between revisions

From RAGE Multiplayer Wiki
Line 9: Line 9:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
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.
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Entity_function_c}}
{{Entity_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Revision as of 11:39, 30 November 2017

Syntax

entity.setMaxSpeed(speed);

Required Arguments

  • speed: float

Return value

  • Undefined

Example

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