Help with this anticheat of health.
#1

Ok, I made this..

pawn Код:
new Float: pHealth[MAX_PLAYERS];

SetTimer("CheckH", 1000, 1);

stock SetPlayerHealthEx(playerid, Float: health)
{
    pHealth[playerid] = health;
    SetPlayerHeatlh(playerid, health);
    return 1;
}

stock GetPlayerHealthEx(playerid, &Float: health)
{
    GetPlayerHealth(playerid, health);
    return 1;
}

forward CheckH();
public CheckH()
{
    static Float:old_health;
    foreach(Player, i)
    {
        GetPlayerHealth(i, old_health);
        if(old_health != pHealth[i])
        {
            SetPlayerHealthEx(i, pHealth[i]);
        }
    }
    return 1;
}
But.. how can I make if a player get's hurt(punched, fired, fall, etc) the HP goes down?

Thanks
Reply


Messages In This Thread
Help with this anticheat of health. - by The_Moddler - 19.10.2010, 00:05
Re: Help with this anticheat of health. - by vection - 19.10.2010, 05:44
Re: Help with this anticheat of health. - by Slice - 19.10.2010, 06:14
Re: Help with this anticheat of health. - by cessil - 19.10.2010, 10:52
Re: Help with this anticheat of health. - by Slice - 19.10.2010, 11:31
Respuesta: Help with this anticheat of health. - by The_Moddler - 19.10.2010, 16:45

Forum Jump:


Users browsing this thread: 1 Guest(s)