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 / Ped
The Ped class represents a pedestrian entity.
This class extends the Entity class and provides an interface for interacting with pedestrian entities.
The constructor takes the entity ID as a parameter and ensures the entity type is a pedestrian.
new Ped(
id):Ped
• id: number
getCurrentVehicle():Vehicle
getHeading():number
setHeading(value):void
• value: number
number
getHealth():number
number
getId():number
number
getIsAPlayer():boolean
boolean
getIsCollisionEnabled():boolean
boolean
getIsHandcuffed():boolean
boolean
getIsInVehicle():boolean
boolean
getIsPositionFrozen():boolean
setIsPositionFrozen(value):void
• value: boolean
boolean
getIsRagdoll():boolean
boolean
getIsStrafing():boolean
boolean
getIsUsingActionMode():boolean
boolean
getIsVisible():boolean
boolean
getLastVehicle():Vehicle
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.