Skip to main content
Client Runs in your resource.
string | integer
required
Model name or hash.
vector4
required
Position and heading. The feet stand at z - 1, so use the coords of a player standing there.
number
default:"50"
The ped spawns within this distance and is deleted beyond it. At most 500.
table
{ dict, name, flag? } or { scenario }.
boolean
default:"true"
boolean
default:"true"
fun(npc)
Runs after the ped exists. npc.ped is its handle.
fun(npc)
Runs before the ped is deleted.
any
Kept on npc.data.
  • Peds are local to the player: other players see their own copy.
  • They ignore events and never ragdoll, so shots and cars do not move them.
  • GetPed returns nil while the player is too far away. Do not keep the handle.
  • Your NPCs are deleted when your resource stops.

Example

client.lua