25.04.2014, 20:15
Quote:
It is teleporting you to every house in the array. Make your IsPlayerNearHouse return the loop index (i) and use that to setPlayerPos.
|
I did this now:
pawn Код:
stock IsPlayerNearHouse(playerid)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < MAX_HOUSES; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 1, HouseInfo[i][hEnterPos][0], HouseInfo[i][hEnterPos][1], HouseInfo[i][hEnterPos][2]))
{
return 1;
}
}
}
return i; // Changed this to i
}