Streaming::requestAnimDict: Difference between revisions
m (Adds description about preloading animations) |
(Adds example of preloading and playing animation.) |
||
| Line 8: | Line 8: | ||
*'''Undefined''' | *'''Undefined''' | ||
==Example== | ==Example== | ||
The example below preloads an animation and applies it into the local player. | |||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
mp.game.streaming.requestAnimDict("random@shop_robbery"); | |||
mp.players.local.taskPlayAnim("random@shop_robbery", "robbery_action_f", 8.0, 1.0, -1, 1, 1.0, false, false, false); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==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 16:33, 20 September 2019
This function is required when using client-side animations, you should preload the anim dictionary before using it, otherwise the animation won't work.
Syntax
mp.game.streaming.requestAnimDict(animDict);
Required Arguments
- animDict: String
Return value
- Undefined
Example
The example below preloads an animation and applies it into the local player.
mp.game.streaming.requestAnimDict("random@shop_robbery");
mp.players.local.taskPlayAnim("random@shop_robbery", "robbery_action_f", 8.0, 1.0, -1, 1, 1.0, false, false, false);