25.02.2015, 20:20
Код:
new shortest = -1, Float:shortdistance= 100.0, Float:distance;
for(new x; x != sizeof GPSBANKS; x++)
{
if((distance = GetPlayerDistanceFromPoint(playerid, GPSBANKS[x][0], GPSBANKS[x][1], GPSBANKS[x][2])) < shortdistance) //line 28785
{
shortest = x;
shortdistance = distance;
}
if(shortest != -1) SetPlayerCheckpoint(playerid, GPSBANKS[shortest][0], GPSBANKS[shortest][1], GPSBANKS[shortest][2], 7.0);
}

