fivem-ts

a library to speed up the development of Fivem scripts and frameworks


Project maintained by Purpose-Dev Hosted on GitHub Pages — Theme by mattgraham

fivem-ts - Documentation v0.7.5Docs


fivem-ts - Documentation v0.7.5 / Client / Model

Class: Model

Class to create and manage entity models.

Constructors

new Model()

new Model(hash): Model

Parameters

hash: string | number

Returns

Model

Defined in

client/Model.ts:10

Accessors

Dimensions

get Dimensions(): Vector3

Gets the model dimensions.

Returns

Vector3

This model dimensions.

Defined in

client/Model.ts:180


Hash

get Hash(): number

Gets hash of the model

Returns

number

The hash key

Defined in

client/Model.ts:23


IsBicycle

get IsBicycle(): boolean

Gets if the model is a bicycle or not.

Returns

boolean

Whether this model is a bicycle.

Defined in

client/Model.ts:68


IsBike

get IsBike(): boolean

Gets if the model is a motorbike or not.

Returns

boolean

Whether this model is a motorbike.

Defined in

client/Model.ts:77


IsBoat

get IsBoat(): boolean

Gets if the model is a boat or not.

Returns

boolean

Whether this model is a boat.

Defined in

client/Model.ts:86


IsCar

get IsCar(): boolean

Gets if the model is a car or not.

Returns

boolean

Whether this model is a car.

Defined in

client/Model.ts:95


IsCargobob

get IsCargobob(): boolean

Returns

boolean

Defined in

client/Model.ts:144


IsCollisionLoaded

get IsCollisionLoaded(): boolean

Gets if the model collision is loaded or not.

Returns

boolean

Whether this model collision is loaded.

Defined in

client/Model.ts:59


IsHelicopter

get IsHelicopter(): boolean

Gets if the model is a helicopter or not.

Returns

boolean

Whether this model is a helicopter.

Defined in

client/Model.ts:104


IsInCdImage

get IsInCdImage(): boolean

Gets if the model is in cd image or not.

Returns

boolean

Whether this model is in cd image.

Defined in

client/Model.ts:41


IsLoaded

get IsLoaded(): boolean

Gets if the model is loaded or not.

Returns

boolean

Whether this model is loaded.

Defined in

client/Model.ts:50


IsPed

get IsPed(): boolean

Gets if the model is a Ped or not.

Returns

boolean

Whether this model is a Ped.

Defined in

client/Model.ts:162


IsPlane

get IsPlane(): boolean

Gets if the model is a plane or not.

Returns

boolean

Whether this model is a plane.

Defined in

client/Model.ts:113


IsProp

get IsProp(): boolean

Gets if the model is a prop or not.

Returns

boolean

Whether this model is a prop.

Defined in

client/Model.ts:171


IsQuadbike

get IsQuadbike(): boolean

Gets if the model is a quadbike or not.

Returns

boolean

Whether this model is a quadbike.

Defined in

client/Model.ts:122


IsTrain

get IsTrain(): boolean

Gets if the model is a train or not.

Returns

boolean

Whether this model is a train.

Defined in

client/Model.ts:131


IsValid

get IsValid(): boolean

Gets if the model is valid or not.

Returns

boolean

Whether this model is valid.

Defined in

client/Model.ts:32


IsVehicle

get IsVehicle(): boolean

Gets if the model is a Cargobob or not.

Returns

boolean

Whether this model is a Cargobob.

Defined in

client/Model.ts:140

Methods

markAsNoLongerNeeded()

markAsNoLongerNeeded(): void

Sets the model as no longer needed allowing the game engine to free memory.

Returns

void

Defined in

client/Model.ts:215


request()

request(timeout): Promise<boolean>

Request and load the model with a specified timeout. Advised timeout - 1000.

Parameters

timeout: number

{number} Maximum allowed time for model to load.

Returns

Promise<boolean>

Defined in

client/Model.ts:194