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 / Vehicle
Vehicle class that extends the Entity class. Represents a vehicle entity.
new Vehicle(
id):Vehicle
• id: number
setAlarm(state):void
• state: boolean
getAreLightsOn():boolean
boolean
getBodyHealth():number
setBodyHealth(value):void
• value: number
number
getColours():VehicleColours
setColours(colours):void
• colours: VehicleColours
getCustomPrimaryColour():CustomVehicleColour
setCustomPrimaryColour(value):void
• value: CustomVehicleColour
getCustomSecondaryColour():CustomVehicleColour
setCustomSecondaryColour(value):void
• value: CustomVehicleColour
getDashboardColour():number
number
getDirtLevel():number
setDirtLevel(value):void
• value: number
number
getEngineHealth():number
number
getHeading():number
setHeading(value):void
• value: number
number
getHealth():number
number
getId():number
number
getIsCollisionEnabled():boolean
boolean
getIsEngineRunning():boolean
boolean
getIsEngineStarting():boolean
boolean
getIsPositionFrozen():boolean
setIsPositionFrozen(value):void
• value: boolean
boolean
getIsPrimaryColourCustom():boolean
boolean
getIsSecondaryColourCustom():boolean
boolean
getIsVisible():boolean
boolean
getLightsState(): [boolean,boolean,boolean]
[boolean, boolean, boolean]
getMaxHealth():number
number
getNetworkId():number
number
getPetrolTankHealth():number
number
getPlate():string
setPlate(value):void
• value: string
string
getPlateIndex():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.
wash():
void
Washes the vehicle by setting the DirtLevel to 0.
void
staticgetFromNetworkId(netId):Entity
Retrieves an entity based on the provided network ID.
• netId: number
The network identifier for the entity.