SetTransformRateForAnimation
DocsSetTransformRateForAnimation(vehicle, transformRate)Description
Affects the playback speed of the submarine car conversion animations. Does not affect hardcoded animations such as the wheels being retracted. In decompiled scripts the only value used for transformRate is 2.5.
Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | The vehicle for which the submarine car conversion animation speed should be adjusted. |
transformRate | float | The rate at which the submarine car conversion animations will be played. |
Quick Snippet: Get Vehiclevehicle
vehicleUse this to get the current vehicle handle for this native.
-- Get the vehicle the player is currently in
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, false)
if vehicle ~= 0 then
print("Vehicle handle: " .. vehicle)
print("Model: " .. GetEntityModel(vehicle))
else
print("Player is not in a vehicle")
endVehicle Models

adder
alpha
blade
ardent
asea
cogcabrio
baller
blistaReturns
voidThis native does not return a value.
Examples
Official
-- This example sets the transform rate for the submarine car conversion animations to 2.5
-- Retrieve the player ped
local playerPed = PlayerPedId()
-- Retrieve the vehicle in which the player is currently seated
local vehicle = GetVehiclePedIsIn(playerPed, false) -- Get the vehicle in which the player is currently seated
-- Retrieve the vehicle model hash
local vehicleHash = GetEntityModel(vehicle)
-- Check if the vehicle exists in the game world and if it is a Stromberg.
if not DoesEntityExist(vehicle) or not vehicleHash == GetHashKey("stromberg") then
-- If the vehicle does not exist or it's not a stromberg, end the execution of the code here.
return
end
-- Set the transform rate for the submarine car conversion animations to 2.5
SetTransformRateForAnimation(vehicle, 2.5)