06.01.2014, 16:21
Worked splendit! My code:
Output:
pawn Code:
MapAndreas_Init(MAP_ANDREAS_MODE_FULL);
for(new a; a < 100; a++)
{
new
x=random(4000)-2000,
y=random(4000)-2000,
Float:z;
MapAndreas_FindZ_For2DCoord(x, y, z);
if(z >= 5.0 && z < 30.0)
{
new File:txt = fopen("randomcoords.txt", io_append), str[30];
format(str, sizeof str, "{%d, %d, %f},\r\n", x, y, z);
fwrite(txt, str);
fclose(txt);
}
}
Code:
{1112, 1162, 9.819999}, {1493, 1273, 9.819999}, {-1511, -462, 5.000000}, {650, -349, 17.209999}, {-1821, -178, 8.389999}, {-451, 590, 16.180000}, {-957, 962, 12.469999}, {779, -1801, 24.309999}, {209, 1165, 14.119999}, {-68, 1469, 10.670000}, {1324, 1751, 17.029998}, {358, 1386, 6.659999}, {1649, 1764, 9.670000}, {-1400, 1499, 6.099999}, {-716, 830, 14.969999}, {1051, 1851, 9.819999}, {1727, 1562, 9.670000}, {-1193, -303, 13.139999}, {-635, -416, 24.319999}, {-1214, -227, 13.139999}, {-27, 918, 20.939998}, {748, -351, 8.929999}, {382, 1432, 6.619999}, {913, 1959, 9.729999}, {-1557, 1796, 19.879999}, {169, 1516, 9.519999}, {954, 882, 15.599999}, {1287, 1260, 9.819999}, {1319, 1253, 19.329999}, {1812, 1076, 5.730000}, {1237, 33, 23.959999}, {167, 765, 18.670000}, {-783, 1612, 26.109998}, {1277, 648, 5.440000}, {-927, 1429, 29.139999}, {-609, -487, 24.519998}, {357, 1907, 16.639999}, {-174, 671, 18.090000}, {1342, -1341, 12.380000}, {1697, 1067, 9.819999}, {478, 1124, 12.619999}, {-591, -1445, 10.969999}, {1477, 238, 18.059999}, {-1175, 1596, 10.149999}, {1014, 1411, 9.809999}, {577, -1661, 18.659999}, {1919, 1345, 23.279998}, {736, 283, 19.750000}, {-1862, 1238, 26.840000}, {1640, -1948, 23.079999}, {-1244, -572, 13.139999}, {-797, 1413, 12.559999},