SA-MP Forums Archive
part of script not functioning - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: part of script not functioning (/showthread.php?tid=433731)



part of script not functioning - M3hdi - 28.04.2013

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;
}



Re: part of script not functioning - LetsOWN[PL] - 28.04.2013

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



Re: part of script not functioning - M3hdi - 28.04.2013

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


Re: part of script not functioning - M3hdi - 28.04.2013

okay but how can i fix it what seems wrong with it


Re: part of script not functioning - Scenario - 28.04.2013

Replace the for loop you have with this:

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



Re: part of script not functioning - M3hdi - 28.04.2013

still not working thanks for helping though