RedM Natives

TASK_ENTER_VEHICLE

Hash0xC20E50AA46D09CA8
Runtime nameTaskEnterVehicle
NamespaceTASK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xC20E50AA46D09CA8

Signature

void TASK_ENTER_VEHICLE(Ped ped, Vehicle vehicle, int timeout, int seat, float speed, int flag, Any p6);

Parameters

NameTypeDescription
pedPed—
vehicleVehicle—
timeoutint—
seatint—
speedfloat—
flagint—
p6Any—

Returns void

Description

flags: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEnterExitVehicleFlags

Usage

Lua
TaskEnterVehicle(ped, vehicle, timeout, seat, speed, flag, p6)

-- always works, by hash
Citizen.InvokeNative(0xC20E50AA46D09CA8, ped, vehicle, timeout, seat, speed, flag, p6)
JavaScript and C#
JavaScript
TaskEnterVehicle(ped, vehicle, timeout, seat, speed, flag, p6);

// by hash
Citizen.invokeNative('0xC20E50AA46D09CA8', ped, vehicle, timeout, seat, speed + 0.0000001, flag, p6);
C#
Function.Call((Hash)0xC20E50AA46D09CA8, ped, vehicle, timeout, seat, speed, flag, p6);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Enums and flags

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.