25.07.2018, 20:39
Quote:
I made
Код:
stock GetClosestStreetEx(Float:X, Float:Y, Float:Z, Float:range) { new Float:distance = range, Float:curdistance, closestStreet = -1; for(new s=1; s <= loadedStreets; s++){ Streamer_GetDistanceToItem(X, Y, Z, 6, Street[s][streetArea], curdistance, 2); printf("%f, %f", curdistance, range); if(curdistance < distance) { closestStreet = s; distance = curdistance; } } return closestStreet; }