Skip to content

REVO / API version 0.0.10

Player

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

Property Type Details
armour number Inherited from Ped.armour
collisionEnabled boolean Inherited from Ped.collisionEnabled
connectionId
readonly
number —
dead
readonly
boolean —
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 Ped.dimension
health number Inherited from Ped.health
hwidHash
readonly
string | null Client-reported SHA-256 hardware identifier in lowercase hex. null when unavailable. Available from playerConnected through playerDisconnected. Not verified by the server.
id
readonly
number Inherited from Ped.id
ip
readonly
string Connection IP address, without the port.
maxHealth number Inherited from Ped.maxHealth
netOwner
readonly
Player | null Inherited from Ped.netOwner
networkId
readonly
number | null Network ID shared with clients. null after destruction.

Inherited from Ped.networkId
ping
readonly
number Round-trip time in milliseconds.
socialClubId
readonly
string | null Verified Rockstar account ID as a decimal string, or null when verification was unavailable or failed.
socialClubName
readonly
string Rockstar’s account name when verified. Otherwise the name supplied by the client.
socialClubVerified
readonly
boolean Whether Rockstar verified this session’s account identity. Available when playerConnected fires.
state
readonly
PlayerState —
streamed boolean Defaults to true and persists across respawns. False streams this player out for all observers. Their own streaming and voice stay active. True restores distance and dimension checks.
type
readonly
BaseType Inherited from Ped.type
valid
readonly
boolean Inherited from Ped.valid
vehicleOccupancy
readonly
IVehicleOccupancy Inherited from Ped.vehicleOccupancy
visible boolean Inherited from Ped.visible
all
static readonly
readonly Player[] Overrides Ped.all
count
static readonly
number Overrides Ped.count
Accessor Type Details
angVelocity Read: Vector3
Write: IVector3
Inherited from Ped.angVelocity
modelHash Read: number
Write: string | number
Accepts a model name or nonzero uint32 hash. Clients load the new model asynchronously.

Inherited from 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

addWeaponComponent(weapon, component): boolean

Parameter Type
weapon number
component number

boolean


clearProp(prop): boolean

Parameter Type
prop PedProp

boolean

Ped.clearProp


clearProps(): boolean

boolean

Ped.clearProps


deleteSyncedMeta(key): void

Parameter Type
key string

void

Ped.deleteSyncedMeta


destroy(): void

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

void

Ped.destroy


getComponentVariation(component): IPedComponentVariation | null

Requested clothing, or null if unset.

Parameter Type
component PedComponent

IPedComponentVariation | null

Ped.getComponentVariation


getFaceFeature(feature): number | null

Parameter Type
feature PedFaceFeature

number | null

Ped.getFaceFeature


getHairColor(): IPedHairColor | null

IPedHairColor | null

Ped.getHairColor


getHeadBlendData(): Required<IPedHeadBlendData> | null

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

Required<IPedHeadBlendData> | null

Ped.getHeadBlendData


getHeadOverlay(overlay): IPedHeadOverlay | null

Parameter Type
overlay PedHeadOverlay

IPedHeadOverlay | null

Ped.getHeadOverlay


getObservers(): readonly Player[]

readonly Player[]

Ped.getObservers


getProp(prop): IPedPropVariation | null

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

Parameter Type
prop PedProp

IPedPropVariation | null

Ped.getProp


getStreamedEntities(): readonly Entity[]

readonly Entity[]


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

Type Parameter
K extends never
Parameter Type
key K

ICustomBaseSyncedMeta[K] | undefined

Ped.getSyncedMeta

getSyncedMeta<T>(key): T | undefined

Type Parameter Default type
T TransportValue
Parameter Type
key string

T | undefined

Ped.getSyncedMeta


getSyncedMetaKeys(): string[]

string[]

Ped.getSyncedMetaKeys


getWeapon(hash): IInventoryWeapon | null

Parameter Type
hash number

IInventoryWeapon | null


getWeaponComponents(weapon): readonly number[]

Parameter Type
weapon number

readonly number[]


giveWeapon(hash, ammo, equip?): boolean

Parameter Type
hash number
ammo number
equip? boolean

boolean

giveWeapon(hash, ammo, loadout, equip?): boolean

Parameter Type
hash number
ammo number
loadout IWeaponLoadout
equip? boolean

boolean


hasStreamedIn(entity): boolean

Parameter Type
entity Entity

boolean


hasSyncedMeta(key): boolean

Parameter Type
key string

boolean

Ped.hasSyncedMeta


hasWeapon(hash): boolean

Parameter Type
hash number

boolean


hasWeaponComponent(weapon, component): boolean

Parameter Type
weapon number
component number

boolean


kick(reason): void

Parameter Type
reason string

void


removeAllWeapons(): void

void


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

Ped.removeFromVehicle


removeWeapon(hash): boolean

Parameter Type
hash number

boolean


removeWeaponComponent(weapon, component): boolean

Parameter Type
weapon number
component number

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

Ped.setComponentVariation


setCurrentWeapon(hash): boolean

Parameter Type
hash number

boolean


setDefaultComponentVariation(): boolean

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

boolean

Ped.setDefaultComponentVariation


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

Ped.setFaceFeature


setHairColor(color, highlight?): boolean

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

Parameter Type
color number
highlight? number

boolean

Ped.setHairColor


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

Ped.setHeadBlendData


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

Ped.setHeadOverlay


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

Ped.setHeadOverlayColor


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

Ped.setIntoVehicle


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

Ped.setProp


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

Ped.setSyncedMeta

setSyncedMeta(values): void

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

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

void

Ped.setSyncedMeta


setWeaponAmmo(hash, ammo): boolean

Parameter Type
hash number
ammo number

boolean


setWeaponLoadout(hash, loadout): boolean

Parameter Type
hash number
loadout IWeaponLoadout

boolean


spawn(pos, heading): boolean

Restores health to maxHealth and resets movement. Returns false if the spawn is rejected.

Parameter Type Description
pos IVector3 -
heading number Heading in radians. Resets pitch and roll to zero.

boolean


static getById(id): Player | null

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

Parameter Type
id number

Player | null

Ped.getById


static getByNetworkId(networkId): Player | null

Parameter Type
networkId number

Player | null

Ped.getByNetworkId


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

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 Player[]

Ped.getInRadius

Spawning and respawning