Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Is there a way to prevent a player from getting out of an anim?

$
0
0
WITHOUT toggling their controls.

For my death system, it applies an animation when you die and a player could get out of it by using the key F or JUMP.

I added this to OnPlayerKeyStateChange:
Code:

if(newkeys & KEY_JUMP && !(oldkeys & KEY_JUMP) && Player[playerid][IsDead] && Player[playerid][Dead])
{
    ApplyAnimation(playerid, "WUZI", "CS_Dead_Guy", 4.1, 0, 0, 0, 1, 0, 1);
}

Doesn't really help.

Here's the animation that applies:
Code:

ApplyAnimation(playerid, "WUZI", "CS_Dead_Guy", 4.1, 0, 0, 0, 1, 0, 1);
LoopingAnim(playerid, "WUZI", "CS_Dead_Guy", 4.1, 1, 1, 1, 1, 30000);
LoopingAnim(playerid, "WUZI", "CS_Dead_Guy", 4.1, 1, 1, 1, 1, 30000);
LoopingAnim(playerid, "WUZI", "CS_Dead_Guy", 4.1, 1, 1, 1, 1, 30000);

I have to have it apply the anim at least three times for it to work well and not spawn the player standing when you respawn from death. Is there a way to do this?

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>