PedClient

setPedIntoVehicle

SET_PED_INTO_VEHICLE0xF75B0D629E1C063D

The GTA V native SET_PED_INTO_VEHICLE of the PED namespace, as LS:MP client scripts call it: the global function setPedIntoVehicle, in JavaScript and in Lua.

SignatureJavaScript
setPedIntoVehicle(ped: Ped, vehicle: Vehicle, seatIndex: number): void
SignatureLua
setPedIntoVehicle(ped: Ped, vehicle: Vehicle, seatIndex: integer)

Usage

JavaScript
setPedIntoVehicle(ped, vehicle, seatIndex);
Lua
setPedIntoVehicle(ped, vehicle, seatIndex)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
vehicleVehiclenumberinteger
seatIndexintnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Ped: The ped to warp.
vehicle: The vehicle to warp the ped into.
Seat_Index: [-1 is driver seat, -2 first free passenger seat]

Moreinfo of Seat Index
DriverSeat = -1
Passenger = 0
Left Rear = 1
RightRear = 2

Reference

Namespace
Ped PED
In the game
void SET_PED_INTO_VEHICLE(Ped ped, Vehicle vehicle, int seatIndex)
Hash
0xF75B0D629E1C063D

Open in the interactive natives reference