03.06.2012, 13:51
Try this:
pawn Code:
public OnGameModeInit()
{
SetTimer("IsPlayerInArea", 1000, true);
return 1;
}
pawn Code:
forward IsPlayerInArea();
public IsPlayerInArea()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerInRangeOfPoint(i, 700.0, -118.3844, 1151.4380, 19.5938))
{
new Float:pHP;
GetPlayerHealth(i, pHP);
SetPlayerHealth(i, pHP-1.0);
}
}
return 1;
}