22.02.2015, 19:04
pawn Код:
new Float:Points[6][3];
{
{2194.9402,1991.0087,12.2969},
{1937.5569,2307.2969,10.8203},
{2452.4729,2065.1914,10.8203},
{2546.5164,1972.6677,10.8203},
{2884.5542,2454.0464,11.0690},
{2117.5156,896.7753,11.1797}
}, shortest=-1, Float:shortdistance=-1;
for(new x; x<6; x++)
{
if(GetPlayerDistanceFromPoint(playerid, Points[x][PosX], Points[x][PosY], Points[x][PosZ]) < shortdistance)
{
shortest = x;
shortdistance = GetPlayerDistanceFromPoint(playerid, Points[x][PosX], Points[x][PosY], Points[x][PosZ]);
}
}
