20.12.2013, 09:24
(
Последний раз редактировалось LMagnifico; 21.12.2013 в 00:54.
)
yah it worked thanks.. but nothing change the problem remains..
any problem with the code?
gl_mapicon
any problem with the code?
Код:
enum mapiconInfo { mpID, mpType, Float:mpX, Float:mpY, Float:mpZ } new MapIconInfo[MAX_MAPICONS][mapiconInfo]; stock SaveMapIcons() { new idx = 0, File:file; new string[256]; while(idx < MAX_MAPICONS) { format(string, sizeof(string), "%d|%f|%f|%f\r\n", MapIconInfo[idx][mpType], MapIconInfo[idx][mpX], MapIconInfo[idx][mpY], MapIconInfo[idx][mpZ]); if(idx == 0) { file = fopen("mapicons.cfg", io_write); } else { file = fopen("mapicons.cfg", io_append); } fwrite(file, string); fclose(file); idx++; } print("Mapicons saved successfully."); } stock LoadMapIcons() { new dinfo[4][128]; new string[256]; new File:file = fopen("mapicons.cfg", io_read); if(file) { new idx = 0; while(idx < MAX_MAPICONS) { fread(file, string); split(string, dinfo, '|'); MapIconInfo[idx][mpType] = strval(dinfo[0]); MapIconInfo[idx][mpX] = floatstr(dinfo[1]); MapIconInfo[idx][mpY] = floatstr(dinfo[2]); MapIconInfo[idx][mpZ] = floatstr(dinfo[3]); if(MapIconInfo[idx][mpType]) // If mapicon exists { CreateDynamicMapIcon(MapIconInfo[idx][mpX], MapIconInfo[idx][mpY], MapIconInfo[idx][mpZ], MapIconInfo[idx][mpType], -1,0, 0, -1, 100.0); } idx++; } } print("Mapicons loaded successfully."); return 1; }
Код:
//------------------------------------------------- // // These are the default map icons from San Andreas // Cluckin Bell, Ammu, Burgershot etc // // Kye 2010 // //------------------------------------------------- #pragma tabsize 0 #include <a_samp> #include <core> #include <float> public OnPlayerConnect(playerid) { SetPlayerMapIcon(playerid,49,822.6,-1590.3,13.5,7,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,50,-2570.1,245.4,10.3,7,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,51,2726.6,-2026.4,17.5,7,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,52,2080.3,2119.0,10.8,7,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,53,675.7,-496.6,16.8,7,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,54,-1805.7,943.2,24.8,29,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,55,2750.9,2470.9,11.0,29,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,56,2351.8,2529.0,10.8,29,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,57,2635.5,1847.4,11.0,29,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,58,2083.4,2221.0,11.0,29,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,59,-1719.1,1359.4,8.6,29,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,60,2330.2,75.2,31.0,29,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,61,203.2,-200.4,6.5,29,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,62,812.9,-1616.1,13.6,10,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,63,1199.1,-924.0,43.3,10,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,64,2362.2,2069.9,10.8,10,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,65,2469.5,2033.8,10.8,10,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,66,2172.9,2795.7,10.8,10,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,67,1875.3,2072.0,10.8,10,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,68,1161.5,2072.0,10.8,10,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,69,-2356.0,1009.0,49.0,10,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,70,-1913.3,826.2,36.9,10,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,71,-2335.6,-165.6,39.5,10,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,72,2397.8,-1895.6,13.7,14,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,73,2421.6,-1509.6,24.1,14,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,74,-2671.6,257.4,4.6,14,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,75,2392.4,2046.5,10.8,14,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,76,2844.5,2401.1,11.0,14,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,77,2635.5,1674.3,11.0,14,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,78,2105.7,2228.7,11.0,14,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,79,-2154.0,-2461.2,30.8,14,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,80,-1816.2,620.8,37.5,14,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,81,-1216.0,1831.4,45.3,14,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,82,172.73,1176.76,13.7,14,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,83,932.0,-1353.0,14.0,14,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,84,1971.7,-2036.6,13.5,39,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,85,2071.6,-1779.9,13.5,39,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,86,2094.6,2119.0,10.8,39,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,87,-2490.5,-40.1,39.3,39,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,88,1372.9,-1278.8,12.5,6,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,89,2400.5,-1978.4,13.5,6,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,90,-2626.6,209.4,4.9,6,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,91,2535.9,2083.5,10.8,6,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,92,2156.5,943.2,10.8,6,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,93,779.7,1874.3,4.9,6,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,94,-2092.7,-2463.8,30.6,6,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,95,240.0,-178.2,2.0,6,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,96,-1509.4,2611.8,58.5,6,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,97,-315.67,829.87,13.43,6,0,MAPICON_LOCAL); SetPlayerMapIcon(playerid,98,2332.9,63.6,31.0,6,0,MAPICON_LOCAL); return 1; }