GetPlayerAnimationIndex help
#1

Alright, another noobie question from me! I have this code I found on the wiki:

pawn Код:
forward CheckHealth(playerid);
public CheckHealth(playerid)
{
    new Float:fHealth;
    GetPlayerHealth(playerid, Float:fHealth);
    if(fHealth != GetPVarFloat(playerid, "faPlayerHealth"))
    {

        if(GetPlayerAnimationIndex(playerid) != 1666 && GetTickCount() < (lastupdate[playerid]+2000) && fHealth > GetPVarFloat(playerid, "faPlayerHealth"))
        {
            SendClientMessageToAll(-1, "HACKS");
        }
        else
        {
            //player lost health  && GetPlayerInterior(playerid) == 0
        }
        SetPVarFloat(playerid, "faPlayerHealth", fHealth);
       
    }
    return 1;
}
This part: "if(GetPlayerAnimationIndex(playerid) != 1666" is supposed to check if player has vending machine use animation. But it still proceeds the code, what am I doing wrong? I don't want to remove them machines.
Reply


Messages In This Thread
GetPlayerAnimationIndex help - by exclide1 - 05.07.2013, 08:54
Re: GetPlayerAnimationIndex help - by Cjgogo - 05.07.2013, 09:01
Re: GetPlayerAnimationIndex help - by exclide1 - 05.07.2013, 09:07

Forum Jump:


Users browsing this thread: 1 Guest(s)