REVO / API version 0.0.10
Ped
Static queries return NPCs only. Use Player’s queries for players.
Extends
Section titled “Extends”Extended by
Section titled “Extended by”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Ped(
model,position,rotation?):Ped
Parameters
Section titled “Parameters”| 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. |
Returns
Section titled “Returns”Ped
Overrides
Section titled “Overrides”Physical.constructor
Properties
Section titled “Properties”| Property | Type | Details |
|---|---|---|
armour |
number |
— |
collisionEnabled |
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. |
health |
number |
|
id |
number |
|
maxHealth |
number |
— |
netOwner |
Player | null |
— |
networkId |
number | null |
Network ID shared with clients. null after destruction. |
type |
BaseType |
|
valid |
boolean |
|
vehicleOccupancy |
IVehicleOccupancy |
— |
visible |
boolean |
|
all |
readonly Ped[] |
|
count |
number |
Accessors
Section titled “Accessors”| Accessor | Type | Details |
|---|---|---|
angVelocity |
Read: Vector3Write: IVector3 |
|
modelHash |
Read: numberWrite: string | number |
Accepts a model name or nonzero uint32 hash. Clients load the new model asynchronously. |
pos |
Read: Vector3Write: IVector3 |
|
quaternion |
Read: QuaternionWrite: IQuaternion |
|
rot |
Read: Vector3Write: IVector3 |
Euler angles in radians, applied X, then Y, then Z. |
velocity |
Read: Vector3Write: IVector3 |
Methods
Section titled “Methods”clearProp()
Section titled “clearProp()”clearProp(
prop):boolean
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
prop |
PedProp |
Returns
Section titled “Returns”boolean
clearProps()
Section titled “clearProps()”clearProps():
boolean
Returns
Section titled “Returns”boolean
deleteSyncedMeta()
Section titled “deleteSyncedMeta()”deleteSyncedMeta(
key):void
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key |
string |
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”destroy()
Section titled “destroy()”destroy():
void
Deletes the entity. Throws for players and already destroyed entities.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”getComponentVariation()
Section titled “getComponentVariation()”getComponentVariation(
component):IPedComponentVariation|null
Requested clothing, or null if unset.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
component |
PedComponent |
Returns
Section titled “Returns”IPedComponentVariation | null
getFaceFeature()
Section titled “getFaceFeature()”getFaceFeature(
feature):number|null
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
feature |
PedFaceFeature |
Returns
Section titled “Returns”number | null
getHairColor()
Section titled “getHairColor()”getHairColor():
IPedHairColor|null
Returns
Section titled “Returns”IPedHairColor | null
getHeadBlendData()
Section titled “getHeadBlendData()”getHeadBlendData():
Required<IPedHeadBlendData> |null
Copy of the requested blend with all fields filled, or null if unset.
Returns
Section titled “Returns”Required<IPedHeadBlendData> | null
getHeadOverlay()
Section titled “getHeadOverlay()”getHeadOverlay(
overlay):IPedHeadOverlay|null
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
overlay |
PedHeadOverlay |
Returns
Section titled “Returns”IPedHeadOverlay | null
getObservers()
Section titled “getObservers()”getObservers(): readonly
Player[]
Returns
Section titled “Returns”readonly Player[]
Inherited from
Section titled “Inherited from”getProp()
Section titled “getProp()”getProp(
prop):IPedPropVariation|null
Requested prop, or null if unset. A cleared prop has drawable -1.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
prop |
PedProp |
Returns
Section titled “Returns”IPedPropVariation | null
getSyncedMeta()
Section titled “getSyncedMeta()”Call Signature
Section titled “Call Signature”getSyncedMeta<
K>(key):ICustomBaseSyncedMeta[K] |undefined
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
K extends never |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key |
K |
Returns
Section titled “Returns”ICustomBaseSyncedMeta[K] | undefined
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”getSyncedMeta<
T>(key):T|undefined
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T |
TransportValue |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key |
string |
Returns
Section titled “Returns”T | undefined
Inherited from
Section titled “Inherited from”getSyncedMetaKeys()
Section titled “getSyncedMetaKeys()”getSyncedMetaKeys():
string[]
Returns
Section titled “Returns”string[]
Inherited from
Section titled “Inherited from”hasSyncedMeta()
Section titled “hasSyncedMeta()”hasSyncedMeta(
key):boolean
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key |
string |
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”removeFromVehicle()
Section titled “removeFromVehicle()”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.
Returns
Section titled “Returns”boolean
setComponentVariation()
Section titled “setComponentVariation()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
component |
PedComponent |
drawable |
number |
texture? |
number |
palette? |
number |
Returns
Section titled “Returns”boolean
setDefaultComponentVariation()
Section titled “setDefaultComponentVariation()”setDefaultComponentVariation():
boolean
Resets clothing to model defaults. Clears component overrides and keeps prop selections.
Returns
Section titled “Returns”boolean
setFaceFeature()
Section titled “setFaceFeature()”setFaceFeature(
feature,scale):boolean
Scale: [-1, 1]. If no blend is set, face, overlay and hair setters use parent indices 0.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
feature |
PedFaceFeature |
scale |
number |
Returns
Section titled “Returns”boolean
setHairColor()
Section titled “setHairColor()”setHairColor(
color,highlight?):boolean
Colours: 0..63. Highlight defaults to 0. Set the hairstyle through PedComponent.Hair.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
color |
number |
highlight? |
number |
Returns
Section titled “Returns”boolean
setHeadBlendData()
Section titled “setHeadBlendData()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data |
IPedHeadBlendData |
Returns
Section titled “Returns”boolean
setHeadOverlay()
Section titled “setHeadOverlay()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
overlay |
PedHeadOverlay |
index |
number |
opacity? |
number |
Returns
Section titled “Returns”boolean
setHeadOverlayColor()
Section titled “setHeadOverlayColor()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
overlay |
PedHeadOverlay |
colorType |
PedOverlayColorType |
color |
number |
secondColor? |
number |
Returns
Section titled “Returns”boolean
setIntoVehicle()
Section titled “setIntoVehicle()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
vehicle |
Vehicle |
seat? |
number |
Returns
Section titled “Returns”boolean
setProp()
Section titled “setProp()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
prop |
PedProp |
drawable |
number |
texture? |
number |
Returns
Section titled “Returns”boolean
setSyncedMeta()
Section titled “setSyncedMeta()”Call Signature
Section titled “Call Signature”setSyncedMeta<
K>(key,value):void
Copies and replicates the value to the object’s audience. Player metadata also goes to that player.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
K extends string |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key |
K |
value |
K extends never ? ICustomBaseSyncedMeta[K] : TransportValue |
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”setSyncedMeta(
values):void
Atomically merges own enumerable fields. Unsupported values reject the entire batch.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
values |
Partial<ICustomBaseSyncedMeta> & Record<string, TransportValue> |
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”getById()
Section titled “getById()”
staticgetById(id):Ped|null
Looks up an NPC. Use Player.getById for players.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id |
number |
Returns
Section titled “Returns”Ped | null
Overrides
Section titled “Overrides”getByNetworkId()
Section titled “getByNetworkId()”
staticgetByNetworkId(networkId):Ped|null
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
networkId |
number |
Returns
Section titled “Returns”Ped | null
Overrides
Section titled “Overrides”getInRadius()
Section titled “getInRadius()”
staticgetInRadius(position,radius,dimension?): readonlyPed[]
Includes global entities alongside the selected dimension. globalDimension selects only global entities. Omit it to search all worlds.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
position |
IVector3 |
radius |
number |
dimension? |
number |
Returns
Section titled “Returns”readonly Ped[]