Entity::setMaxSpeed: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
 
(3 intermediate revisions by one other user not shown)
Line 3: Line 3:
<syntaxhighlight lang="javascript">entity.setMaxSpeed(speed);</syntaxhighlight>
<syntaxhighlight lang="javascript">entity.setMaxSpeed(speed);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''speed:''' float
*'''speed:''' <b><font color='green'>float</font></b>
 
===Return value===
===Return value===
*'''Undefined'''
*'''Undefined'''
==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_definition_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]

Latest revision as of 17:52, 1 May 2024

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