RedM Index logoRedM Index
NativesHashesClothesBlipsPropsItem Tool
Sign inGet started

Reference

  • Natives
  • Hashes
  • Clothes
  • Blips
  • Props

Namespace

  1. Reference
  2. Natives
  3. CREATE_PED

CREATE_PED

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). **This is the server-side RPC native equivalent of the client native [CREATE_PED](?\_0xD49F9B0955C367DE).**

CFX

Signature

lua
CreatePed(0, GetHashKey("..."), 0.0, 0.0, 0.0, 0.0, true, true)
-- returns Entity

Parameters

NameTypeDescription
intUnused. Peds get set to CIVMALE/CIVFEMALE/etc. no matter the value specified.
HashThe model of ped to spawn.
floatSpawn coordinate X component.
floatSpawn coordinate Y component.
floatSpawn coordinate Z component.
floatHeading to face towards, in degrees.
BOOLWhether to create a network object for the ped. If false, the ped exists only locally.
BOOLWhether to register the ped as pinned to the script host in the R\* network model.

Usage

lua
CreatePed(0, GetHashKey("..."), 0.0, 0.0, 0.0, 0.0, true, true)

Generated from the native name, hash, and parameter list. Add a real example.

Details

Hash
API set
Source
cfx

Source: cfx

On this page

  • Signature
  • Parameters
  • Usage
  • Details