createPed
Server
Creates a ped on the server, seen by every player.
Also exists on the client, 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.
The ped is placed under the dynamic element of the resource that created it and starts with 100 health.
Example
local guard = createPed("male01", 1481.0, -1771.0, 18.8, 180)
giveWeapon(guard, "PISTOL", 60, true)