Hello, after the creation of the loop does not work for me either 3dText or MapIcon.
PHP код:
forward ShowBays(playerid);
public ShowBays(playerid)
{
for(new id = 0; id < MAX_BAYS; id++)
{
SetPlayerMapIcon(id, 12, BayCache[bPosX], BayCache[bPosY], BayCache[bPosZ], 51, 0, MAPICON_LOCAL);
}
return 1;
}
PHP код:
forward LoadBays();
public LoadBays()
{
new
info[256],
query[256],
data[256];
format(query, sizeof query, "SELECT * FROM `bays`");
mysql_query(query);
mysql_store_result();
new nums = mysql_num_rows();
printf("[TOWARY] Zaladowano %d towarow.", nums);
for(new i = 0; i < nums; i++)
{
if(mysql_fetch_row(data, ","))
{
sscanf(data, "p<,>ds[32]fff",
BayCache[bUID],
BayCache[bName],
BayCache[bCargo],
BayCache[bPosX],
BayCache[bPosY],
BayCache[bPosZ]
);
format(info, sizeof info, "{00CC00}[{FFFFFF}%d{00CC00}]\nDok załadunkowy w:\n{00CC00}%s", BayCache[bUID], BayCache[bName]);
Create3DTextLabel(info, -1, BayCache[bPosX], BayCache[bPosY], BayCache[bPosZ], 0.0, 0, 1);
}
}
return 1;
}