natives.hasModelLoaded

From GTA Connected
Jump to navigation Jump to search

Function Client Only icon-iv.png Online and Offline

Available since Client 1.0.0

bool natives.hasModelLoaded(int modelHash)

The natives.hasModelLoaded function is used to Returns whether the specified model has finished loading into memory.

Parameters

1) int modelHash The model hash to check.

Return

bool True if the model is loaded, false otherwise.

Notes

Examples

Example 1 - JavaScript:

const hash = natives.getHashKey("M_Y_COP"); if (natives.hasModelLoaded(hash)) {

   const ped = natives.createChar(1, hash, localPlayer.position, true);

}

Compatibility

There isn't any compatibility information for this function.