22.04.2015, 19:42
dont return -1,change IsPlayerNearHouse to:
and change other loops that are like this:
to:
pawn Код:
stock IsPlayerNearHouse(playerid)
{
for(new i = 1; i < MAX_HOUSES; i++)
{
if(HouseIDTaken[i] && IsPlayerInRangeOfPoint(playerid, 1.0, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ])) return i;
}
return 0;
}
pawn Код:
for(new i = 0; i < MAX_HOUSES; i++)
pawn Код:
for(new i = 1; i < MAX_HOUSES; i++)