Affected Zones help
#1

Hello guys, I'm a bit troubled right now as I wanted to know that what's the name of the Fs ( or if its include ) in which if player enters a location then his health starts dropping ( radiation ).

Please find it or tell me how to do it. ( Couldn't find it in search )

Thanks,
Benzke.
Reply
#2

you could make this yourself easily just use
pawn Код:
isplayerinrangeofpoint
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)