Skip to main content

Graphics::requestStreamedTextureDictAsync

Not available on SYNC MP yet

This member is part of the RAGE:MP API but SYNC MP does not implement it yet (Client-side JavaScript). Calling it does nothing or throws.

Client-side function

JavaScript​

Summary​

Asynchronously requests a streamed texture dictionary to be loaded.

Syntax​

mp.game.graphics.requestStreamedTextureDictAsync(name, timeout = 5000);

Required Parameters​

  • name: string - The name of the texture dictionary to load.
  • timeout: number - Optional. Timeout in milliseconds (default: 5000).

Return Value​

  • 'Promise<bool>' - Resolves to true if the texture is loaded, or false if it times out.

Example​

mp.game.graphics.requestStreamedTextureDictAsync("commonmenu", 3000).then(success => {
if (success) {
mp.gui.chat.push("Texture dictionary loaded!");
} else {
mp.gui.chat.push("Failed to load texture dictionary.");
}
});