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
getHeading():number
setHeading(value):void
• value: number
number
getHealth():number
number
getId():number
number
getIsCollisionEnabled():boolean
boolean
getIsPositionFrozen():boolean
setIsPositionFrozen(value):void
• value: boolean
boolean
getIsVisible():boolean
boolean
getMaxHealth():number
number
getNetworkId():number
number
getPosition():Vector3
setPosition(vector):void
• vector: Vector3
getRotation():Vector3
setRotation(vector):void
• vector: Vector3
getRotationVelocity():Vector3
getSpeed():number
number
getVelocity():Vector3
setVelocity(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.
staticgetFromNetworkId(netId):Entity
Retrieves an entity based on the provided network ID.
• netId: number
The network identifier for the entity.