Перейти к содержанию

Graphics::requestStreamedTextureDict

Материал из RAGE MP Wiki Archive
Версия от 15:44, 5 июля 2018; imported>Rootcause (Added example)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

Requests the specified texture dictionary.

Syntax

<syntaxhighlight lang="javascript">mp.game.graphics.requestStreamedTextureDict(textureDict, p1);</syntaxhighlight>

Required Arguments

  • textureDict: String
  • p1: Boolean

Return value

  • Undefined

Example

Client-Side

<syntaxhighlight lang="javascript"> // This function will load the specified texture dictionary. function loadTextureDictionary(textureDict) {

   if (!mp.game.graphics.hasStreamedTextureDictLoaded(textureDict)) {
       mp.game.graphics.requestStreamedTextureDict(textureDict, true);
       while (!mp.game.graphics.hasStreamedTextureDictLoaded(textureDict)) mp.game.wait(0);
   }

}

loadTextureDictionary("commonmenu"); // will load commonmenu.ytd </syntaxhighlight>

See also