Player::stopAnimation: Difference between revisions

From RAGE Multiplayer Wiki
m (Replaced HTML with template)
Line 13: Line 13:
{{ServersideCode|
{{ServersideCode|
<pre>
<pre>
// todo
// call this events from client side to do animation for 10s and stop it
 
mp.events.add("DoMedicalCheck", (player) => {
    player.taskStartScenarioInPlace('CODE_HUMAN_MEDIC_KNEEL', 0, true)
    setTimeout(() => {
        player.stopAnimation()
    }, 10000)
})
</pre>
</pre>
}}
}}

Revision as of 21:29, 20 April 2019

This method stops animation of the player

Parameters

None

Syntax

Server-Side
player.stopAnimation()

Example

Server-Side
// call this events from client side to do animation for 10s and stop it

mp.events.add("DoMedicalCheck", (player) => {
    player.taskStartScenarioInPlace('CODE_HUMAN_MEDIC_KNEEL', 0, true)
    setTimeout(() => {
        player.stopAnimation()
    }, 10000)
})

See Also