Streaming::requestModel

From RAGE Multiplayer Wiki
Revision as of 22:58, 24 May 2017 by Ragempdev (talk | contribs)

Request a model to be loaded into memory

Looking it the disassembly, it seems like it actually returns the model if it's already loaded.

Syntax

mp.game.streaming.requestModel(model[, cb]);

Required Arguments

  • model: Model hash or name
  • callback: Function

Return value

  • Undefined

Example

mp.game.streaming.requestModel("infernus", () =>
{
    mp.gui.outputChatBox(`${mp.game.streaming.hasModelLoaded("infernus")} is true`);
});

See also

Template:Streaming s function c