get closest point?
#5

did you make a mistake?

pawn Код:
distance = PointToPoint(px, py, pz, ClosestBurgerShots[i], ClosestBurgerShots[i], ClosestBurgerShots[z]);
u put 2 i's and one z. im just wondering where did the z come from, and

pawn Код:
if(distance < min)
                    {
                        minindex = i;
                        min = distance;
                        new Loc[MAX_ZONE_NAME];
                        Get2DZone(Loc,ClosestBurgerShots[i], ClosestBurgerShots[i], ClosestBurgerShots[z]);
                        SetPlayerRouting(playerid, 1559.5081, -1290.5549,"Burger Shot In %s",Loc);
                    }
how do i set the routing to the closest one?
//edit also
pawn Код:
new Float:ClosestBurgerShots[][3] = {
{2366.3240,2071.0330,10.8203},
{2472.1331,2034.2130,11.0625},
{1873.4980,2071.7546,11.0625}
};
Reply


Messages In This Thread
get closest point? - by The_Gangstas - 11.12.2010, 16:37
Re: get closest point? - by Mauzen - 11.12.2010, 17:44
Re: get closest point? - by The_Gangstas - 11.12.2010, 17:48
Re: get closest point? - by Mauzen - 11.12.2010, 17:54
Re: get closest point? - by The_Gangstas - 11.12.2010, 18:00
Re: get closest point? - by Mauzen - 11.12.2010, 18:08

Forum Jump:


Users browsing this thread: