28.04.2013, 14:05
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;
}