a library to speed up the development of Fivem scripts and frameworks
fivem-ts - Documentation v0.7.5 • Docs
fivem-ts - Documentation v0.7.5 / Server / Entity
Represents an entity. Provides various methods and properties to access and manipulate the entity’s state.
new Entity(
id
):Entity
• id: number
get
Heading():number
set
Heading(value
):void
• value: number
number
get
Health():number
number
get
Id():number
number
get
IsCollisionEnabled():boolean
boolean
get
IsPositionFrozen():boolean
set
IsPositionFrozen(value
):void
• value: boolean
boolean
get
IsVisible():boolean
boolean
get
MaxHealth():number
number
get
NetworkId():number
number
get
Position():Vector3
set
Position(vector
):void
• vector: Vector3
get
Rotation():Vector3
set
Rotation(vector
):void
• vector: Vector3
get
RotationVelocity():Vector3
get
Speed():number
number
get
Velocity():Vector3
set
Velocity(vector
):void
• vector: Vector3
delete():
void
Deletes the current entity based on its id.
void
No return value.
exists():
boolean
Checks if the entity with the current instance’s ID exists.
boolean
True if the entity exists, otherwise false.
static
getFromNetworkId(netId
):Entity
Retrieves an entity based on the provided network ID.
• netId: number
The network identifier for the entity.