CREATE_PED_INSIDE_VEHICLE
VS_DRIVER, VS_FRONT_RIGHT, VS_BACK_LEFT, VS_BACK_RIGHT, VS_EXTRA_LEFT_1, VS_EXTRA_RIGHT_1, VS_EXTRA_LEFT_2, VS_EXTRA_RIGHT_2, VS_EXTRA_LEFT_3, VS_EXTRA_RIGHT_3, VS_NUM_SEATS
Hash
0x7DD959874C1FD534Runtime name
CreatePedInsideVehicleNamespacePED
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x7DD959874C1FD534Signature
Ped CREATE_PED_INSIDE_VEHICLE(Vehicle vehicle, Hash modelHash, int seatIndex, BOOL p3, BOOL p4, BOOL p5);Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | — |
modelHash | Hash | — |
seatIndex | int | — |
p3 | BOOL | — |
p4 | BOOL | — |
p5 | BOOL | — |
Returns Ped
Description
seatIndex:
enum eVehicleSeat
{
VS_ANY_PASSENGER = -2,
VS_DRIVER,
VS_FRONT_RIGHT,
VS_BACK_LEFT,
VS_BACK_RIGHT,
VS_EXTRA_LEFT_1,
VS_EXTRA_RIGHT_1,
VS_EXTRA_LEFT_2,
VS_EXTRA_RIGHT_2,
VS_EXTRA_LEFT_3,
VS_EXTRA_RIGHT_3,
VS_NUM_SEATS
};Usage
local retval = CreatePedInsideVehicle(vehicle, modelHash, seatIndex, p3, p4, p5)
-- always works, by hash
local retval = Citizen.InvokeNative(0x7DD959874C1FD534, vehicle, modelHash, seatIndex, p3, p4, p5, Citizen.ResultAsInteger())JavaScript and C#
const retval = CreatePedInsideVehicle(vehicle, modelHash, seatIndex, p3, p4, p5);
// by hash
const retval = Citizen.invokeNative('0x7DD959874C1FD534', vehicle, modelHash, seatIndex, p3, p4, p5, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x7DD959874C1FD534, vehicle, modelHash, seatIndex, p3, p4, p5);- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("name")or a backtick literal like`name`.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.