REVO / API version 0.0.10
Ped
Ped collections contain NPCs, including LocalPed instances.
Extends
Section titled “Extends”Extended by
Section titled “Extended by”Properties
Section titled “Properties”| Property | Type | Details |
|---|---|---|
armor |
number |
— |
dead |
boolean |
— |
desiredHeading |
number |
— |
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. |
heading |
number |
Heading in radians. |
health |
number |
|
id |
number |
Local ID, assigned independently on the client and server. |
isLocallySimulated |
boolean |
Simulation authority does not grant permission to change server-owned state. |
isNetworked |
boolean |
|
isStreamedIn |
boolean |
|
maxHealth |
number |
|
moveBlendRatio |
number |
— |
netOwner |
Player | null |
|
networkId |
number | null |
Server-assigned network ID, or null without replication. Separate from id. |
ready |
boolean |
The initial server state has been applied, or a client-only entity has streamed in. |
scriptID |
number |
GTA handle, or 0 while not streamed in. Do not retain it across frames. |
streamDistance |
number | null |
Per-object distance in metres. null uses the streamer’s default. |
streamingEnabled |
boolean |
Enables automatic streaming. Disabling it preserves the current streaming state. A dimension mismatch still suspends it until its dimension is visible again. |
type |
BaseType |
|
valid |
boolean |
|
vehicleOccupancy |
IVehicleOccupancy | null |
Synchronized seat state. null for a client-only ped. |
all |
readonly Ped[] |
|
count |
number |
Accessors
Section titled “Accessors”| Accessor | Type | Details |
|---|---|---|
angVelocity |
Read: Vector3Write: IVector3 |
Angular velocity in radians per second. |
modelHash |
number |
|
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”activatePhysics()
Section titled “activatePhysics()”activatePhysics():
void
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”aimGunAtCoord()
Section titled “aimGunAtCoord()”aimGunAtCoord(
position):void
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
position |
IVector3 |
Returns
Section titled “Returns”void
clearTasks()
Section titled “clearTasks()”clearTasks():
void
Returns
Section titled “Returns”void
clearTasksImmediately()
Section titled “clearTasksImmediately()”clearTasksImmediately():
void
Returns
Section titled “Returns”void
destroy()
Section titled “destroy()”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.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”getSyncedMeta()
Section titled “getSyncedMeta()”Call Signature
Section titled “Call Signature”getSyncedMeta<
K>(key):ICustomBaseSyncedMeta[K] |undefined
Returns a copy. Client-only objects have no synced metadata.
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
Returns a copy. Client-only objects have no synced metadata.
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”goStraightToCoord()
Section titled “goStraightToCoord()”goStraightToCoord(
position,moveBlendRatio,heading,targetRadius):void
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
position |
IVector3 |
- |
moveBlendRatio |
number |
- |
heading |
number |
Heading in radians. |
targetRadius |
number |
- |
Returns
Section titled “Returns”void
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”jump()
Section titled “jump()”jump():
void
Returns
Section titled “Returns”void
reloadWeapon()
Section titled “reloadWeapon()”reloadWeapon():
void
Returns
Section titled “Returns”void
setBlockingOfNonTemporaryEvents()
Section titled “setBlockingOfNonTemporaryEvents()”setBlockingOfNonTemporaryEvents(
blocked):void
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
blocked |
boolean |
Returns
Section titled “Returns”void
setPlayerControl()
Section titled “setPlayerControl()”setPlayerControl(
enabled):void
Only available on Player.local. Throws for any other ped.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
enabled |
boolean |
Returns
Section titled “Returns”void
setRagdoll()
Section titled “setRagdoll()”setRagdoll(
enabled):void
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
enabled |
boolean |
Returns
Section titled “Returns”void
shootAtCoord()
Section titled “shootAtCoord()”shootAtCoord(
position):void
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
position |
IVector3 |
Returns
Section titled “Returns”void
standStill()
Section titled “standStill()”standStill(
durationMs):void
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
durationMs |
number |
Returns
Section titled “Returns”void
getById()
Section titled “getById()”
staticgetById(id):Ped|null
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”getByScriptId()
Section titled “getByScriptId()”
staticgetByScriptId(scriptID):Ped|null
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
scriptID |
number |
Returns
Section titled “Returns”Ped | null