CreatePed — FiveM Natives
0x389EF71 · CFX · server
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.
Parameters
| Name | Type | Description |
|---|---|---|
| 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. |
Returns
Entity