What's wrong with this?
#4

Quote:
Originally Posted by mamorunl
Посмотреть сообщение
It is teleporting you to every house in the array. Make your IsPlayerNearHouse return the loop index (i) and use that to setPlayerPos.
You mean put SetPlayerPos inside the stock?
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
}
Reply


Messages In This Thread
What's wrong with this? - by AphexCCFC - 25.04.2014, 19:58
Re: What's wrong with this? - by mamorunl - 25.04.2014, 20:04
Re: What's wrong with this? - by ]Rafaellos[ - 25.04.2014, 20:04
Re: What's wrong with this? - by AphexCCFC - 25.04.2014, 20:15
Re: What's wrong with this? - by Konstantinos - 25.04.2014, 20:17
Re: What's wrong with this? - by AphexCCFC - 25.04.2014, 20:23
Re: What's wrong with this? - by Galletziz - 25.04.2014, 20:25

Forum Jump:


Users browsing this thread: 1 Guest(s)