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 / Client / Model
Class to create and manage entity models.
new Model(
hash):Model
• hash: string | number
getDimensions():Vector3
Gets the model dimensions.
This model dimensions.
getHash():number
Gets hash of the model
number
The hash key
getIsBicycle():boolean
Gets if the model is a bicycle or not.
boolean
Whether this model is a bicycle.
getIsBike():boolean
Gets if the model is a motorbike or not.
boolean
Whether this model is a motorbike.
getIsBoat():boolean
Gets if the model is a boat or not.
boolean
Whether this model is a boat.
getIsCar():boolean
Gets if the model is a car or not.
boolean
Whether this model is a car.
getIsCargobob():boolean
boolean
getIsCollisionLoaded():boolean
Gets if the model collision is loaded or not.
boolean
Whether this model collision is loaded.
getIsHelicopter():boolean
Gets if the model is a helicopter or not.
boolean
Whether this model is a helicopter.
getIsInCdImage():boolean
Gets if the model is in cd image or not.
boolean
Whether this model is in cd image.
getIsLoaded():boolean
Gets if the model is loaded or not.
boolean
Whether this model is loaded.
getIsPed():boolean
Gets if the model is a Ped or not.
boolean
Whether this model is a Ped.
getIsPlane():boolean
Gets if the model is a plane or not.
boolean
Whether this model is a plane.
getIsProp():boolean
Gets if the model is a prop or not.
boolean
Whether this model is a prop.
getIsQuadbike():boolean
Gets if the model is a quadbike or not.
boolean
Whether this model is a quadbike.
getIsTrain():boolean
Gets if the model is a train or not.
boolean
Whether this model is a train.
getIsValid():boolean
Gets if the model is valid or not.
boolean
Whether this model is valid.
getIsVehicle():boolean
Gets if the model is a Cargobob or not.
boolean
Whether this model is a Cargobob.
markAsNoLongerNeeded():
void
Sets the model as no longer needed allowing the game engine to free memory.
void
request(
timeout):Promise<boolean>
Request and load the model with a specified timeout. Advised timeout - 1000.
• timeout: number
{number} Maximum allowed time for model to load.
Promise<boolean>