forward OnLoadDynamicMapIcon(index); public OnLoadDynamicMapIcon(index) { new string[256]; new rows, fields; cache_get_data(rows, fields, MainPipeline); for(new field;field<fields;field++) { cache_get_row(index, field, string, MainPipeline); switch(field) { case 0: DMPInfo[index][dmpSQLId] = strval(string); case 1: DMPInfo[index][dmpMarkerType] = strval(string); case 2: DMPInfo[index][dmpColor] = strval(string); case 3: DMPInfo[index][dmpVW] = strval(string); case 4: DMPInfo[index][dmpInt] = strval(string); case 5: DMPInfo[index][dmpPosX] = floatstr(string); case 6: DMPInfo[index][dmpPosY] = floatstr(string); case 7: DMPInfo[index][dmpPosZ] = floatstr(string); } } if(DMPInfo[index][dmpMarkerType] != 0) DMPInfo[index][dmpMapIconID] = CreateDynamicMapIcon(DMPInfo[index][dmpPosX], DMPInfo[index][dmpPosY], DMPInfo[index][dmpPosZ], DMPInfo[index][dmpMarkerType], DMPInfo[index][dmpColor], DMPInfo[index][dmpVW], DMPInfo[index][dmpInt], -1, 500.0); return 1; } stock LoadDynamicMapIcons() { printf("[LoadDynamicMapIcons] Loading data from database..."); mysql_query(MainPipeline, "SELECT * FROM `dmapicons`", true, "OnLoadDynamicMapIcons", ""); } forward OnLoadDynamicMapIcons(); public OnLoadDynamicMapIcons() { new string[256], iIndex = 0; new rows, fields; cache_get_data(rows, fields, MainPipeline); while(iIndex<rows) { for(new field;field<fields;field++) { cache_get_row(iIndex, field, string, MainPipeline); switch(field) { case 0: DMPInfo[iIndex][dmpSQLId] = strval(string); case 1: DMPInfo[iIndex][dmpMarkerType] = strval(string); case 2: DMPInfo[iIndex][dmpColor] = strval(string); case 3: DMPInfo[iIndex][dmpVW] = strval(string); case 4: DMPInfo[iIndex][dmpInt] = strval(string); case 5: DMPInfo[iIndex][dmpPosX] = floatstr(string); case 6: DMPInfo[iIndex][dmpPosY] = floatstr(string); case 7: DMPInfo[iIndex][dmpPosZ] = floatstr(string); } } if(DMPInfo[iIndex][dmpMarkerType] != 0) DMPInfo[iIndex][dmpMapIconID] = CreateDynamicMapIcon(DMPInfo[iIndex][dmpPosX], DMPInfo[iIndex][dmpPosY], DMPInfo[iIndex][dmpPosZ], DMPInfo[iIndex][dmpMarkerType], DMPInfo[iIndex][dmpColor], DMPInfo[iIndex][dmpVW], DMPInfo[iIndex][dmpInt], -1, 500.0); iIndex++; } if(iIndex > 0) printf("[LoadDynamicMapIcons] %d map icons rehashed/loaded.", iIndex); else printf("[LoadDynamicMapIcons] Failed to load any map icons."); return 1; }
cache_get_data
cache_get_row
https://sampforum.blast.hk/showthread.php?tid=404546
In this link you will see how to change from R6 to R7. Just do the other way around. |
"In this link you will see how to change from R6 to R7. Just do the other way around." |