Перейти к содержанию

Entity::setMaxSpeed

Материал из RAGE MP Wiki Archive
Версия от 17:52, 1 мая 2024; imported>Shr0x (See also)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

Syntax

<syntaxhighlight lang="javascript">entity.setMaxSpeed(speed);</syntaxhighlight>

Required Arguments

  • speed: float

Return value

  • Undefined

Example

<syntaxhighlight lang="javascript"> 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>

See also