Skip to content

REVO / API version 0.0.10

Player

The same Player object survives model changes and server respawns.

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

Inherited from 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
boolean Inherited from Ped.isNetworked
isSpawned
readonly
boolean —
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
number | null Server-assigned network ID, or null without replication. Separate from id.

Inherited from 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 Player[] Overrides Ped.all
count
static readonly
number Overrides Ped.count
local
static readonly
Player Available before the first server spawn. Network state clears on disconnect.
Accessor Type Details
angVelocity Read: Vector3
Write: IVector3
Angular velocity in radians per second.

Inherited from Ped.angVelocity
modelHash
readonly
number 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

activatePhysics(): void

void

Ped.activatePhysics


aimGunAtCoord(position): void

Parameter Type
position IVector3

void

Ped.aimGunAtCoord


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


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


setPlayerControl(enabled): void

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

Parameter Type
enabled boolean

void

Ped.setPlayerControl


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): Player | null

Parameter Type
id number

Player | null

Ped.getById


static getByNetworkId(networkId): Player | null

Parameter Type
networkId number

Player | null

Ped.getByNetworkId


static getByScriptId(scriptID): Player | null

Parameter Type
scriptID number

Player | null

Ped.getByScriptId

Spawning and respawning