part of script not functioning
#1

it used to work not it don't whats wrong with it?
pawn Код:
stock GetNearestCoordsForPlayer(playerid)
{
        new
        Float:DefDist = 999999999.9,
        Float:CurDist,
        id = -1
    ;
    for(new d; d != sizeof(ALocations); d++)
    {
        CurDist = GetPlayerDistanceFromPoint(playerid, ALocations[d][LocX], ALocations[d][LocY], ALocations[d][LocZ]);
        if(CurDist < DefDist)
        {
            DefDist = CurDist;
            id = d;
        }
   }
   return id;
}
Reply
#2

Quote:
Originally Posted by M3hdi
Посмотреть сообщение
it used to work not it don't whats wrong with it?
me yoda understand you no.

What's the problem? Describe it...
Greetz,
LetsOWN
Reply
#3

i dont know its the same EXACT one now it dont work it spouse to give you nearest cords but it dont even though its the same script
Reply
#4

okay but how can i fix it what seems wrong with it
Reply
#5

Replace the for loop you have with this:

pawn Код:
for(new d = 0; d < sizeof(ALocations); d++)
Reply
#6

still not working thanks for helping though
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)