Native referenceFiveM

CREATE_PED

0xD49F9B0955C367DE PED
FUNCTION SIGNATURE
Ped CREATE_PED(int pedType, Hash modelHash, float x, float y, float z, float heading, BOOL isNetwork, BOOL bScriptHostPed);
Property Value
Native Name CREATE_PED
Hash 0xD49F9B0955C367DE
Return Type Ped
Parameters pedType (int), modelHash (Hash), x (float), y (float), z (float), heading (float), isNetwork (BOOL), bScriptHostPed (BOOL)

Description: Creates a ped (biped character, pedestrian, actor) with the specified model at the specified position and heading. This ped will initially be owned by the creating script as a mission entity, and the model should be loaded already (e.g. using REQUEST_MODEL).

Parameters

  • pedType (int) — Unused. Peds get set to CIVMALE/CIVFEMALE/etc. no matter the value specified.
  • modelHash (Hash) — The model of ped to spawn.
  • x (float) — Spawn coordinate X component.
  • y (float) — Spawn coordinate Y component.
  • z (float) — Spawn coordinate Z component.
  • heading (float) — Heading to face towards, in degrees.
  • isNetwork (BOOL) — Whether to create a network object for the ped. If false, the ped exists only locally.
  • bScriptHostPed (BOOL) — Whether to register the ped as pinned to the script host in the R* network model.
Back to PED