createPed
Client
Creates a ped that exists on this client only.
Also exists on the server, with its own implementation: createPed
ped|false createPed(string model, float x, y, z [, float rotation = 0])
Parameters
| Name | Type | Description |
|---|---|---|
| model | string | The ped model's name, such as male01. |
| x, y, z | float | Position in the world, or a vec3. |
| rotation | float | Rotation in degrees around the Z axis.default 0 |
Returns
The created ped, or false if the model is not a ped model or the ped could not be created.
The ped starts with 100 health. Other players do not see it.
Example
local ped = createPed("male01", 2495.0, -1685.0, 13.5, 90)
setPedEnterVehicle(ped)