Affected Zones help
#3

pawn Код:
new LoseHP[MAX_PLAYERS];

forward NegativeDown(playerid);

public OnPlayerUpdate(playerid) // not recommended but just for the test.
{
    if(IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z))
    {
        LoseHP[playerid] = SetTimerEx("NegativeDown",1000,1,"i",playerid);
    }
    return 1;
}

public NegativeDown(playerid)
{
    new Float:health;
    GetPlayerHealth(playerid, health);
    SetPlayerHealth(playerid, health - 1.5); // Getting the players health and dropping it down by 1.5 hp (float)
    return 1;
}

// Remember to use KillTimer(LoseHP[playerid]); Somewhere to stop losing health
Reply


Messages In This Thread
Affected Zones help - by Benzke - 17.05.2012, 07:37
Re: Affected Zones help - by Flake. - 17.05.2012, 08:18
Re: Affected Zones help - by Kitten - 17.05.2012, 08:23

Forum Jump:


Users browsing this thread: 1 Guest(s)