IsPlayerRunning
#2

Use

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerAnimationIndex(playerid))
    {
        new animlib[32];
        new animname[32];
        new msg[128];
        GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
        format(msg, 128, "Running anim: %s %s", animlib, animname);
        SendClientMessage(playerid, 0xFFFFFFFF, msg);
    }
    return 1;
}
and run, get the animation name and do this:

pawn Код:
#define RUNANIM_LIB "RUNNING"
#define RUNANIM_NAME "RUN" // Change these obviously, because they're not correct.

stock IsPlayerRunning ( playerid )
{
new animlib[32], animname[32];
GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);

if( strcmp( animlib, RUNANIM_LIB, false ) && strcmp( animname, RUNANIM_NAME, false ) )
{
return true;
}
else return false;
}
Sorry about the indentation, school computers.. blah. That's my guess on how to do it; otherwise, check out IsPlayerSwimming and modify that to your needs.
Reply


Messages In This Thread
IsPlayerRunning - by zgintasz - 30.04.2012, 12:01
Re: IsPlayerRunning - by 2KY - 30.04.2012, 12:53
Re: IsPlayerRunning - by Vince - 30.04.2012, 13:03
Re: IsPlayerRunning - by zgintasz - 30.04.2012, 13:05
Re: IsPlayerRunning - by Finn - 30.04.2012, 14:05
Re: IsPlayerRunning - by SuperViper - 30.04.2012, 14:09

Forum Jump:


Users browsing this thread: 1 Guest(s)