PedClient

createPedInsideVehicle

CREATE_PED_INSIDE_VEHICLE0x7DD959874C1FD534

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

SignatureJavaScript
createPedInsideVehicle(
  vehicle: Vehicle,
  pedType: number,
  modelHash: Hash,
  seat: number,
  isNetwork: boolean,
  bScriptHostPed: boolean
): Ped
SignatureLua
createPedInsideVehicle(
  vehicle: Vehicle,
  pedType: integer,
  modelHash: Hash,
  seat: integer,
  isNetwork: boolean,
  bScriptHostPed: boolean
): Ped

Usage

JavaScript
const ped = createPedInsideVehicle(
  vehicle, pedType, modelHash, seat, isNetwork, bScriptHostPed
);
Lua
local ped = createPedInsideVehicle(vehicle, pedType, modelHash, seat, isNetwork, bScriptHostPed)

Parameters

ParameterTypeJavaScriptLuaDescription
vehicleVehiclenumberinteger
pedTypeintnumberintegersee createPed
modelHashHashnumberinteger
seatintnumberinteger
isNetworkBOOLbooleanboolean
bScriptHostPedBOOLbooleanboolean

Returns

Ped JavaScript number, Lua integer

Game handle of a ped. Not an LS:MP netId. Convert one with lsmp.getEntityFromNetId.

Notes

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

Reference

Namespace
Ped PED
In the game
Ped CREATE_PED_INSIDE_VEHICLE(Vehicle vehicle, int pedType, Hash modelHash, int seat, BOOL isNetwork, BOOL bScriptHostPed)
Hash
0x7DD959874C1FD534

Open in the interactive natives reference