Код HTML:
stock LoadDynamicMIs()
{
new Str[1000], dmiLoad;
mysql_query(MySQLConnection, "SELECT * FROM `mapicons`", false);
mysql_store_result();
mysql_fetch_row(Str);
while(mysql_fetch_row_format(Str, "|", MySQLConnection))
{
if(!mysql_num_rows()) continue;
sscanf(Str, "p<|>iiiiifff",
DMIInfo[dmiLoad][dmiID],
DMIInfo[dmiLoad][dmiModel],
DMIInfo[dmiLoad][dmiColor],
DMIInfo[dmiLoad][dmiVirtualWorld],
DMIInfo[dmiLoad][dmiInterior],
DMIInfo[dmiLoad][dmiPosX],
DMIInfo[dmiLoad][dmiPosY],
DMIInfo[dmiLoad][dmiPosZ]
);
Iter_Add(DMI, DMIInfo[dmiLoad][dmiID] = CreateDynamicMapIcon(DMIInfo[dmiLoad][dmiPosX], DMIInfo[dmiLoad][dmiPosY], DMIInfo[dmiLoad][dmiPosZ], DMIInfo[dmiLoad][dmiModel], DMIInfo[dmiLoad][dmiColor], DMIInfo[dmiLoad][dmiVirtualWorld], DMIInfo[dmiLoad][dmiInterior], -1, 1000));
dmiLoad++;
}
mysql_free_result();
printf("Total MapIcons Loaded = %i", dmiLoad);
return 1;
}