05.07.2014, 14:02
The mistake is that you send message that the player is not in range of that house without checking if the player is not in range of ANY house before doing that. Because the player is not near the first house, that doesn't mean that they're not close to another one.
pawn Код:
new bool: near_house;
for(new h; h < MAX_HOUSES; h++)
{
if(IsPlayerInRangeOfPoint(playerid, 5, HouseInfo[h][hEnterX], HouseInfo[h][hEnterY] , HouseInfo[h][hEnterZ]))
{
// code..
near_house = true;
break;
}
}
if (!near_house) SendClientMessage(playerid, COL_RED, "Jus nesate prie parduodamo namo!"); //You are not near the house

