PedManager
@vimp-mp/types 2.0.1Manages ped instances in this scripting context.
ts
interface PedManagerMembers
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 | nullCreate a server-controlled pedestrian. Returns null if the server is full (per max_peds in config).
destroy
ts
destroy(id: number): booleanDestroy 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 | nullReturns the ped with id, or null when it does not exist.
isVisibleToPlayer
ts
isVisibleToPlayer(player: number | Player, ped: number | Ped): booleanWhether the server currently streams this ped to the player.