Skip to content

REVO / API version 0.0.10

Ped

Ped collections contain NPCs, including LocalPed instances.

Property Type Details
armor number —
dead
readonly
boolean —
desiredHeading number —
dimension
readonly
number World ID, default 0. Writable on local objects created by this resource. The server controls other objects. globalDimension makes the object visible in every numbered world.

Inherited from Physical.dimension
heading number Heading in radians.

Inherited from Physical.heading
health number Inherited from Physical.health
id
readonly
number Local ID, assigned independently on the client and server.

Inherited from Physical.id
isLocallySimulated
readonly
boolean Simulation authority does not grant permission to change server-owned state.

Inherited from Physical.isLocallySimulated
isNetworked
readonly
boolean Inherited from Physical.isNetworked
isStreamedIn
readonly
boolean Inherited from Physical.isStreamedIn
maxHealth number Inherited from Physical.maxHealth
moveBlendRatio
readonly
number —
netOwner
readonly
Player | null Inherited from Physical.netOwner
networkId
readonly
number | null Server-assigned network ID, or null without replication. Separate from id.

Inherited from Physical.networkId
ready
readonly
boolean The initial server state has been applied, or a client-only entity has streamed in.

Inherited from Physical.ready
scriptID
readonly
number GTA handle, or 0 while not streamed in. Do not retain it across frames.

Inherited from Physical.scriptID
streamDistance number | null Per-object distance in metres. null uses the streamer’s default.

Inherited from Physical.streamDistance
streamingEnabled boolean Enables automatic streaming. Disabling it preserves the current streaming state. A dimension mismatch still suspends it until its dimension is visible again.

Inherited from Physical.streamingEnabled
type
readonly
BaseType Inherited from Physical.type
valid
readonly
boolean Inherited from Physical.valid
vehicleOccupancy
readonly
IVehicleOccupancy | null Synchronized seat state. null for a client-only ped.
all
static readonly
readonly Ped[] Overrides Physical.all
count
static readonly
number Overrides Physical.count
Accessor Type Details
angVelocity Read: Vector3
Write: IVector3
Angular velocity in radians per second.

Inherited from Physical.angVelocity
modelHash
readonly
number Inherited from Physical.modelHash
pos Read: Vector3
Write: IVector3
Inherited from Physical.pos
quaternion Read: Quaternion
Write: IQuaternion
Inherited from Physical.quaternion
rot Read: Vector3
Write: IVector3
Euler angles in radians, applied X, then Y, then Z.

Inherited from Physical.rot
velocity Read: Vector3
Write: IVector3
Inherited from Physical.velocity

activatePhysics(): void

void

Physical.activatePhysics


aimGunAtCoord(position): void

Parameter Type
position IVector3

void


clearTasks(): void

void


clearTasksImmediately(): void

void


destroy(): void

Deletes an entity created by this resource. Throws if the entity is networked, belongs to another resource, has been destroyed, or cannot be removed from GTA.

void

Physical.destroy


getSyncedMeta<K>(key): ICustomBaseSyncedMeta[K] | undefined

Returns a copy. Client-only objects have no synced metadata.

Type Parameter
K extends never
Parameter Type
key K

ICustomBaseSyncedMeta[K] | undefined

Physical.getSyncedMeta

getSyncedMeta<T>(key): T | undefined

Returns a copy. Client-only objects have no synced metadata.

Type Parameter Default type
T TransportValue
Parameter Type
key string

T | undefined

Physical.getSyncedMeta


getSyncedMetaKeys(): string[]

string[]

Physical.getSyncedMetaKeys


goStraightToCoord(position, moveBlendRatio, heading, targetRadius): void

Parameter Type Description
position IVector3 -
moveBlendRatio number -
heading number Heading in radians.
targetRadius number -

void


hasSyncedMeta(key): boolean

Parameter Type
key string

boolean

Physical.hasSyncedMeta


jump(): void

void


reloadWeapon(): void

void


setBlockingOfNonTemporaryEvents(blocked): void

Parameter Type
blocked boolean

void


setPlayerControl(enabled): void

Only available on Player.local. Throws for any other ped.

Parameter Type
enabled boolean

void


setRagdoll(enabled): void

Parameter Type
enabled boolean

void


shootAtCoord(position): void

Parameter Type
position IVector3

void


standStill(durationMs): void

Parameter Type
durationMs number

void


static getById(id): Ped | null

Parameter Type
id number

Ped | null

Physical.getById


static getByNetworkId(networkId): Ped | null

Parameter Type
networkId number

Ped | null

Physical.getByNetworkId


static getByScriptId(scriptID): Ped | null

Parameter Type
scriptID number

Ped | null

Physical.getByScriptId

NPCs and scripted behavior