Skip to content

REVO / API version 0.0.10

LocalPed

Created asynchronously when streamed in. Collections and lookups include only this resource’s peds.

new LocalPed(model, position, heading): LocalPed

Parameter Type Description
model string | number -
position IVector3 -
heading number Heading in radians.

LocalPed

Ped.constructor

Property Type Details
armor number Inherited from Ped.armor
dead
readonly
boolean Inherited from Ped.dead
desiredHeading number Inherited from Ped.desiredHeading
dimension 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.

Overrides Ped.dimension
heading number Heading in radians.

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

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

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

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

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

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

Inherited from Ped.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 Ped.streamingEnabled
type
readonly
BaseType Inherited from Ped.type
valid
readonly
boolean Inherited from Ped.valid
vehicleOccupancy
readonly
IVehicleOccupancy | null Synchronized seat state. null for a client-only ped.

Inherited from Ped.vehicleOccupancy
all
static readonly
readonly LocalPed[] Overrides Ped.all
count
static readonly
number Overrides Ped.count
Accessor Type Details
angVelocity Read: Vector3
Write: IVector3
Angular velocity in radians per second.

Inherited from Ped.angVelocity
modelHash Read: number
Write: string | number
Accepts a model name or nonzero hash of the same entity type. Returns the old hash until the new model is applied.

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

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

activatePhysics(): void

void

Ped.activatePhysics


aimGunAtCoord(position): void

Parameter Type
position IVector3

void

Ped.aimGunAtCoord


clearProp(prop): boolean

Parameter Type
prop PedProp

boolean


clearProps(): boolean

boolean


clearTasks(): void

void

Ped.clearTasks


clearTasksImmediately(): void

void

Ped.clearTasksImmediately


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

Ped.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


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

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

Type Parameter
K extends never
Parameter Type
key K

ICustomBaseSyncedMeta[K] | undefined

Ped.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

Ped.getSyncedMeta


getSyncedMetaKeys(): string[]

string[]

Ped.getSyncedMetaKeys


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

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

void

Ped.goStraightToCoord


hasSyncedMeta(key): boolean

Parameter Type
key string

boolean

Ped.hasSyncedMeta


jump(): void

void

Ped.jump


reloadWeapon(): void

void

Ped.reloadWeapon


setBlockingOfNonTemporaryEvents(blocked): void

Parameter Type
blocked boolean

void

Ped.setBlockingOfNonTemporaryEvents


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

Uses global drawable indices. Can be set before stream-in and persists across streaming and model changes. Unset components use the model’s default outfit. Unsupported combinations are skipped. Returns false outside these ranges: component 0..11, drawable 0..65535, texture 0..255, palette 0..3. Texture and palette default to 0. Throws if the ped is destroyed, networked or owned by another resource.

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

boolean


setDefaultComponentVariation(): boolean

Resets clothing to model defaults. 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. Uses the same ownership and persistence rules as clothing. 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


setPlayerControl(enabled): void

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

Parameter Type
enabled boolean

void

Ped.setPlayerControl


setProp(prop, drawable, texture?): boolean

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. Uses the same ownership, persistence and validation rules as setComponentVariation.

Parameter Type
prop PedProp
drawable number
texture? number

boolean


setRagdoll(enabled): void

Parameter Type
enabled boolean

void

Ped.setRagdoll


shootAtCoord(position): void

Parameter Type
position IVector3

void

Ped.shootAtCoord


standStill(durationMs): void

Parameter Type
durationMs number

void

Ped.standStill


static getById(id): LocalPed | null

Parameter Type
id number

LocalPed | null

Ped.getById


static getByNetworkId(networkId): null

Parameter Type
networkId number

null

Ped.getByNetworkId


static getByScriptId(scriptID): LocalPed | null

Parameter Type
scriptID number

LocalPed | null

Ped.getByScriptId

Animations