Skip to content

PedManager

@vimp-mp/types 2.0.1

Interface · Server API

Manages ped instances in this scripting context.

ts
interface PedManager

Members

all

ts
readonly all: Array<Ped>

Snapshot of all currently alive server peds.

create

ts
create(model: number, x: number, y: number, z: number, heading: number, extras?: PedExtras): Ped | null

Create a server-controlled pedestrian. Returns null if the server is full (per max_peds in config).

destroy

ts
destroy(id: number): boolean

Destroy a ped by id. Prefer ped.destroy() when you hold the instance — this is a convenience for callers that only have the id.

getById

ts
getById(id: number): Ped | null

Returns the ped with id, or null when it does not exist.

isVisibleToPlayer

ts
isVisibleToPlayer(player: number | Player, ped: number | Ped): boolean

Whether the server currently streams this ped to the player.

VIMP developer documentation