Skip to content

REVO / API version 0.0.10

Ped

Static queries return NPCs only. Use Player’s queries for players.

new Ped(model, position, rotation?): Ped

Parameter Type Description
model string | number Model name (ASCII case-insensitive) or unsigned 32-bit hash.
position IVector3 -
rotation? number | IVector3 | IQuaternion Heading or XYZ Euler angles in radians, or a unit quaternion. Defaults to zero heading.

Ped

Physical.constructor

Property Type Details
armour number —
collisionEnabled boolean Inherited from Physical.collisionEnabled
dimension number Dimension: 0..4294967294, default 0. globalDimension shows entities and spatial audio in every dimension. Players cannot use globalDimension. Global entities share movement, damage and seats across dimensions. A vehicle’s trailer follows its dimension. Occupants follow unless the new dimension is global.

Inherited from Physical.dimension
health number Inherited from Physical.health
id
readonly
number Inherited from Physical.id
maxHealth number —
netOwner
readonly
Player | null —
networkId
readonly
number | null Network ID shared with clients. null after destruction.

Inherited from Physical.networkId
type
readonly
BaseType Inherited from Physical.type
valid
readonly
boolean Inherited from Physical.valid
vehicleOccupancy
readonly
IVehicleOccupancy —
visible boolean Inherited from Physical.visible
all
static readonly
readonly Ped[] Overrides Physical.all
count
static readonly
number Overrides Physical.count
Accessor Type Details
angVelocity Read: Vector3
Write: IVector3
Inherited from Physical.angVelocity
modelHash Read: number
Write: string | number
Accepts a model name or nonzero uint32 hash. Clients load the new model asynchronously.

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

clearProp(prop): boolean

Parameter Type
prop PedProp

boolean


clearProps(): boolean

boolean


deleteSyncedMeta(key): void

Parameter Type
key string

void

Physical.deleteSyncedMeta


destroy(): void

Deletes the entity. Throws for players and already destroyed entities.

void

Physical.destroy


getComponentVariation(component): IPedComponentVariation | null

Requested clothing, or null if unset.

Parameter Type
component PedComponent

IPedComponentVariation | null


getFaceFeature(feature): number | null

Parameter Type
feature PedFaceFeature

number | null


getHairColor(): IPedHairColor | null

IPedHairColor | null


getHeadBlendData(): Required<IPedHeadBlendData> | null

Copy of the requested blend with all fields filled, or null if unset.

Required<IPedHeadBlendData> | null


getHeadOverlay(overlay): IPedHeadOverlay | null

Parameter Type
overlay PedHeadOverlay

IPedHeadOverlay | null


getObservers(): readonly Player[]

readonly Player[]

Physical.getObservers


getProp(prop): IPedPropVariation | null

Requested prop, or null if unset. A cleared prop has drawable -1.

Parameter Type
prop PedProp

IPedPropVariation | null


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

Type Parameter
K extends never
Parameter Type
key K

ICustomBaseSyncedMeta[K] | undefined

Physical.getSyncedMeta

getSyncedMeta<T>(key): T | undefined

Type Parameter Default type
T TransportValue
Parameter Type
key string

T | undefined

Physical.getSyncedMeta


getSyncedMetaKeys(): string[]

string[]

Physical.getSyncedMetaKeys


hasSyncedMeta(key): boolean

Parameter Type
key string

boolean

Physical.hasSyncedMeta


removeFromVehicle(): boolean

Removes the ped and cancels pending entry or exit, including requests made while on foot. Releases the server seat immediately. GTA chooses the exit position.

boolean


setComponentVariation(component, drawable, texture?, palette?): boolean

Uses global drawable indices. Once clothing is set, unset components use the model’s default outfit. Persists across streaming, respawns and model changes. Clients skip unsupported combinations. Returns false outside these ranges: component 0..11, drawable 0..65535, texture 0..255, palette 0..3.

Parameter Type
component PedComponent
drawable number
texture? number
palette? number

boolean


setDefaultComponentVariation(): boolean

Resets clothing to model defaults. Clears component overrides and keeps prop selections.

boolean


setFaceFeature(feature, scale): boolean

Scale: [-1, 1]. If no blend is set, face, overlay and hair setters use parent indices 0.

Parameter Type
feature PedFaceFeature
scale number

boolean


setHairColor(color, highlight?): boolean

Colours: 0..63. Highlight defaults to 0. Set the hairstyle through PedComponent.Hair.

Parameter Type
color number
highlight? number

boolean


setHeadBlendData(data): boolean

Applies to mp_m_freemode_01 and mp_f_freemode_01. Other models store the values without applying them. Persists across streaming, respawns and model changes. Keeps face features, overlays and hair colours. Returns false for out-of-range values. Wrong types and non-finite numbers throw TypeError.

Parameter Type
data IPedHeadBlendData

boolean


setHeadOverlay(overlay, index, opacity?): boolean

Index: 0..254, or -1 to disable. Unavailable indices also disable the overlay. Opacity: [0, 1], default 1. Keeps the overlay’s colours.

Parameter Type
overlay PedHeadOverlay
index number
opacity? number

boolean


setHeadOverlayColor(overlay, colorType, color, secondColor?): boolean

Colours: 0..63. Use setHeadOverlay to enable the overlay. Hair palette: facial hair, eyebrows, chest hair. Makeup palette: blush and lipstick.

Parameter Type
overlay PedHeadOverlay
colorType PedOverlayColorType
color number
secondColor? number

boolean


setIntoVehicle(vehicle, seat?): boolean

Places the ped in a vehicle. Seat -1 is the driver (default). Seats 0–14 are passengers. Returns false for occupied or reserved seats, dead peds, unspawned players, invalid seat indices, or vehicles outside the ped’s visible dimension. Returns true when the server accepts the request. Clients wait for the vehicle to load and reject seats missing from its model. Requesting the current seat has no effect.

Parameter Type
vehicle Vehicle
seat? number

boolean


setProp(prop, drawable, texture?): boolean

Uses global drawable indices. Prop: 0..12, drawable: -1..65535, texture: 0..255 (default 0). Drawable -1 requires texture 0 and clears the prop. Unsupported combinations leave it cleared on that client. Persists across streaming, respawns and model changes.

Parameter Type
prop PedProp
drawable number
texture? number

boolean


setSyncedMeta<K>(key, value): void

Copies and replicates the value to the object’s audience. Player metadata also goes to that player.

Type Parameter
K extends string
Parameter Type
key K
value K extends never ? ICustomBaseSyncedMeta[K] : TransportValue

void

Physical.setSyncedMeta

setSyncedMeta(values): void

Atomically merges own enumerable fields. Unsupported values reject the entire batch.

Parameter Type
values Partial<ICustomBaseSyncedMeta> & Record<string, TransportValue>

void

Physical.setSyncedMeta


static getById(id): Ped | null

Looks up an NPC. Use Player.getById for players.

Parameter Type
id number

Ped | null

Physical.getById


static getByNetworkId(networkId): Ped | null

Parameter Type
networkId number

Ped | null

Physical.getByNetworkId


static getInRadius(position, radius, dimension?): readonly Ped[]

Includes global entities alongside the selected dimension. globalDimension selects only global entities. Omit it to search all worlds.

Parameter Type
position IVector3
radius number
dimension? number

readonly Ped[]

Physical.getInRadius

NPCs and scripted behavior