Swim and walk
#3

You can check if a player is swimming by his animation.

Код:
bool:IsPlayerSwimming(playerid)
{
    if(GetPlayerAnimationIndex(playerid))
    {
        new animlib[32];
        new animname[32];
        GetAnimationName(GetPlayerAnimationIndex(playerid), animlib, sizeof(animlib), animname, sizeof(animname));
        if(strcmp(animlib, "SWIM", true) == 0)
            return true;
    }
    return false;
}
Reply


Messages In This Thread
Swim and walk - by Bani Raheja - 22.06.2015, 10:18
Re: Swim and walk - by Hessu - 22.06.2015, 14:10
Re: Swim and walk - by Larceny - 22.06.2015, 14:21
Re: Swim and walk - by Hessu - 22.06.2015, 14:24
Re : Swim and walk - by KillerDVX - 22.06.2015, 17:04
Re: Re : Swim and walk - by Bani Raheja - 22.06.2015, 17:49
Re : Swim and walk - by KillerDVX - 22.06.2015, 19:38

Forum Jump:


Users browsing this thread: 1 Guest(s)