detect animation
#1

if player CLIMB_STAND
the animation won't work
is this code are right?
pawn Код:
new animlib[32];
            new animname[32];
            GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
            if(strcmp(animlib, "CLIMB_STAND", true) == 0) return 0;
            {
                ApplyAnimation(playerid,"ped","idle_stance",4.1,0,0,0,0,1,1);
            }
        }
Reply
#2

bump ?
Reply
#3

Try this.
PHP код:
           new animlib[32];
            new 
animname[32];
            
GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
            if(
strcmp(animlib"CLIMB_STAND"true) == 0)
            {
                
ApplyAnimation(playerid,"ped","IDLE_stance",4.1,0,0,0,0,1,1);
            }
        } 
Reply
#4

if player get CLIMB YES THE ANIMATION WONT WORK DON'TApllyAnim
if player get CLIMB NO THE ANIMATION WILL WORK ApplyAnimation

pawn Код:
if(RELEASED(KEY_SPRINT))
        {
            new animlib[32];
            new animname[32];
            GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
            if(!strcmp(animlib, "CLIMB_JUMP", true))
            if(!strcmp(animlib, "CLIMB_IDLE", true))
            if(!strcmp(animlib, "CLIMB_PULL", true))
            if(!strcmp(animlib, "CLIMB_STAND", true))
            {
                SendClientMessage(playerid,white,"Climb-YES");
            }
            ApplyAnimation(playerid,"ped","idle_stance",4.1,0,0,0,0,1,1);
            SendClientMessage(playerid,white,"Climb-NO");
        }
Reply
#5

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)