24.08.2010, 10:48
How can i make when poeple /pee or use any animation it will be increase health 1/sec. and when player type or didn't use anim it will not increase health
forward PeeHealth(playerid), peetimer;
peetimer = SetTimerEx("PeeHealth", 1000, true, "d", playerid);
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;
}
undefined symbol "PAULNMAC"
undefined symbol "Piss_loop"
if(animlib == "PAULNMAC" && animname = "Piss_loop")