The Lab
PED native

CREATE_PED

returns Ped9 paramsbuild 1207

Spawns a ped of model modelHash at the given coordinates and heading, and returns its handle. isNetwork makes it visible to other players.

Request and load the model first, and on story models apply an outfit preset so the ped is not invisible.

Signature

C
Ped CREATE_PED(Hash modelHash, float x, float y, float z, float heading, BOOL isNetwork, BOOL bScriptHostPed, BOOL p7, BOOL p8); // 0xD49F9B0955C367DE b1207

Parameters

#NameType
1modelHashHash
2xfloat
3yfloat
4zfloat
5headingfloat
6isNetworkBOOL
7bScriptHostPedBOOL
8p7BOOL
9p8BOOL

Facts

Facts about CREATE_PED
Name
CREATE_PED
Hash
0xD49F9B0955C367DE
Namespace
Returns
Ped
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local ped = Citizen.InvokeNative(0xD49F9B0955C367DE, -- CREATE_PED
  GetHashKey("a_c_horse_arabian_white"), -- Hash modelHash
  0.0, -- float x
  0.0, -- float y
  0.0, -- float z
  0.0, -- float heading
  false, -- BOOL isNetwork
  false, -- BOOL bScriptHostPed
  false, -- BOOL p7
  false, -- BOOL p8
  Citizen.ResultAsInteger()
)
print(ped)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const ped = Citizen.invokeNative("0xD49F9B0955C367DE", // CREATE_PED
  GetHashKey("a_c_horse_arabian_white"), // Hash modelHash
  0.0, // float x
  0.0, // float y
  0.0, // float z
  0.0, // float heading
  false, // BOOL isNetwork
  false, // BOOL bScriptHostPed
  false, // BOOL p7
  false, // BOOL p8
  Citizen.resultAsInteger()
);
console.log(ped)
C#
int ped = Function.Call<int>((Hash)0xD49F9B0955C367DE, // CREATE_PED
  (uint)API.GetHashKey("a_c_horse_arabian_white"), // Hash modelHash
  0.0f, // float x
  0.0f, // float y
  0.0f, // float z
  0.0f, // float heading
  false, // BOOL isNetwork
  false, // BOOL bScriptHostPed
  false, // BOOL p7
  false // BOOL p8
);
All PED natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.