Wait for animation to complete before starting another
#1

For example, I have this script:
PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if((
newkeys KEY_JUMP) && !(oldkeys KEY_JUMP)) {
        
ApplyAnimation(playerid"PARACHUTE""FALL_skyDive_DIE"4.10110790);
    }

How can I force player to wait before animation plays fully and only then give him ability to re-play it?
(Something like animation anti-flood)
Reply
#2

PHP код:
if(GetPlayerAnimationIndex(playerid) != 0// ... player is using some animation 
Reply
#3

Quote:
Originally Posted by kovac
Посмотреть сообщение
PHP код:
if(GetPlayerAnimationIndex(playerid) != 0// ... player is using some animation 
Every movement is an animation : standing, runing, walking, shooting. I guess when you are spectating, you don't have any animation.
Reply
#4

Dayrion is right, GetPlayerAnimationIndex returns 0 only if spectating/not spawned.
Reply
#5

I've found temporary solution - setting timer after every ApplyAnimation, but I still need another (more optimized and clean) way to do this.
Reply
#6

Sorry for bumping, but wanted you to know that SAMP is very raw and needs more work, but Kalcor doesn't give a shit about it. SAMP is dying, move to MTA.

Why the hell are animations synced by players and not controlled by server?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)