Streaming::hasAnimDictLoaded: Difference between revisions
| Line 11: | Line 11: | ||
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;"> | <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> | <div style="margin: 10px 10px 10px 10px;"><b>Client-Side</b></div> | ||
<syntaxhighlight lang="javascript" highlight=" | <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) => { | ||
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);
});