Anim Help
#2

Add at the top

pawn Код:
forward PeeHealth(playerid), peetimer;
Add at the pee command

pawn Код:
peetimer = SetTimerEx("PeeHealth", 1000, true, "d", playerid);
This must be NOT in the pee command!

pawn Код:
public PeeHealth(playerid)
{
    if(GetPlayerAnimationIndex(playerid))
    {
        new animlib[32];
        new animname[32];
        GetAnimationName(GetPlayerAnimationIndex(playerid), animlib, 32, animname, 32);
        if(animlib == PAULNMAC && animname = Piss_loop)
        {
            new Float:oldhealth;
            GetPlayerHealth(playerid, oldhealth);
            if(oldhealth >= 100) return KillTimer(peetimer);
            SetPlayerHealth(playerid, oldhealth+1);
            return 1;
        }
        else KillTimer(peetimer);
    }
    return 1;
}
If it gives the errors:

PHP код:
undefined symbol "PAULNMAC"
undefined symbol "Piss_loop" 
then make it

pawn Код:
if(animlib == "PAULNMAC" && animname = "Piss_loop")
Reply


Messages In This Thread
Anim Help - by xinix000 - 24.08.2010, 10:48
Re: Anim Help - by Claude - 24.08.2010, 11:45
Re: Anim Help - by RSX - 24.08.2010, 11:54
Re: Anim Help - by Claude - 24.08.2010, 11:59
Re: Anim Help - by xinix000 - 01.10.2010, 16:29

Forum Jump:


Users browsing this thread: 1 Guest(s)