natives.requestModel: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
(Created page with "{{ScriptItem |endpoint = client |games = iv |type = function |name = natives.requestModel |parameters = int modelHash |parameter1 = int modelHash The model hash to request (obtained with natives.getHashKey) |usage = Requests the specified model to be loaded into memory. |notes = - Must be called before creating a ped or vehicle with that model - Use natives.hasModelLoaded to check if the model is ready |return1 = void |returnFail1 = void |exampleJS = natives.getH...")
 
(No difference)

Latest revision as of 00:13, 4 December 2025

Function Client Only icon-iv.png Online and Offline

Available since Client 1.0.0

void natives.requestModel(int modelHash)

The natives.requestModel function is used to Requests the specified model to be loaded into memory.

Parameters

1) int modelHash The model hash to request (obtained with natives.getHashKey).

Return

void This function doesn't return a value.

Notes

  • - Must be called before creating a ped or vehicle with that model- Use natives.hasModelLoaded to check if the model is ready.

Examples

Example 1 - JavaScript:

natives.getHashKey("M_Y_COP"); natives.requestModel(hash);

Compatibility

There isn't any compatibility information for this function.