Problem with, Health Drain if Player is not near point + message
#4

Quote:
Originally Posted by iGetty
View Post
pawn Code:
public isPlayerInArea() // change "forward isPlayerInArea(playerid);", to "forward isPlayerInArea();"
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerInRangeOfPoint(i, 700.0, -118.3844, 1151.4380, 19.5938)) // center of Fort Carson
        {
            return 1; // does nothing if player is in area
        }
        else
        {
            new Float:dhealth;
            GetPlayerHealth(i, dhealth);
            SetPlayerHealth(i, dhealth - 1.0);
        }
    }
    return 1;
}
I did something like this, it ended up draining everyones health, if one person was outside, maybe I did it wrong, will try this out.

EDIT:
Yeah this did not work, it was close though, but for some reason the first player dies a few times on connect, and the other players only loose health if the first player is also outside, if the first player enters, no one looses health.

I have tried a few more methods but I just can't get it to work properly.
Does anyone know how it can be done?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)