Streaming::hasAnimDictLoaded: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
Line 6: Line 6:
===Return value===
===Return value===
*'''Boolean'''
*'''Boolean'''
==Example==
==Example #1==  
<syntaxhighlight lang="javascript">
This example will output notification with specified message.
// todo
 
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
<div style="margin: 10px 10px 10px 10px;"><b>Client-Side</b></div>
<syntaxhighlight lang="javascript" highlight="3-7">
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);
});
</syntaxhighlight>
</syntaxhighlight>
</div>
==See also==
==See also==
{{Streaming_s_function_c}}
{{Streaming_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Revision as of 23:15, 5 January 2018

Syntax

mp.game.streaming.hasAnimDictLoaded(animDict);

Required Arguments

  • animDict: String

Return value

  • Boolean

Example #1

This example will output notification with specified message.

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