Streaming::hasAnimDictLoaded: Difference between revisions

From RAGE Multiplayer Wiki
m (Replaced HTML with template)
Line 1: Line 1:
==Syntax==
<pre>
mp.game.streaming.hasAnimDictLoaded(animDict);
</pre>


==Syntax==
<syntaxhighlight lang="javascript">mp.game.streaming.hasAnimDictLoaded(animDict);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''animDict:''' String
*'''animDict:''' String
===Return value===
===Return value===
*'''Boolean'''
*'''Boolean'''
==Example #1==  
==Example #1==  
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
{{ClientsideCode|
<div style="margin: 10px 10px 10px 10px;"><b>Client-Side</b></div>
<pre>
<syntaxhighlight lang="javascript" highlight="4">
mp.game.streaming.requestAnimDict("amb@code_human_cower@male@base");
mp.game.streaming.requestAnimDict("amb@code_human_cower@male@base");
new Promise((resolve, reject) => {
new Promise((resolve, reject) => {
Line 19: Line 22:
}, 100);
}, 100);
});
});
</syntaxhighlight>
</pre>
</div>
}}


==See also==
==See also==

Revision as of 13:01, 26 October 2018

Syntax

mp.game.streaming.hasAnimDictLoaded(animDict);

Required Arguments

  • animDict: String

Return value

  • Boolean

Example #1

Client-Side
mp.game.streaming.requestAnimDict("amb@code_human_cower@male@base");
new Promise((resolve, reject) => {
	const timer = setInterval(() => {
		if(mp.game.streaming.hasAnimDictLoaded("amb@code_human_cower@male@base")) {
			clearInterval(timer);
			resolve();
		}
	}, 100);
});

See also

Template:Streaming s function c