03.04.2015, 01:08
(
Последний раз редактировалось willsuckformoney; 03.04.2015 в 01:43.
)
The pickup creates, the houses load etc. But it does not show the text label. The code looks fine in my eyes.
pawn Код:
//OnGameModeInIt
for(new h; h < MAX_HOUSES; h++)
{
mysql_format(mysql, query, sizeof(query), "SELECT * FROM `houses` WHERE `hID` = '%d' LIMIT 1", h);
mysql_tquery(mysql, query, "OnHousesLoad", "d", h);
}
//callback
public OnHousesLoad(houseid)
{
hInfo[houseid][hID] = cache_get_field_content_int(0, "hID");
if(hInfo[houseid][hID] > 0)
{
hInfo[houseid][owned] = cache_get_field_content_int(0, "owned");
cache_get_field_content(0, "owner",hInfo[houseid][owner]);
cache_get_field_content(0, "address",hInfo[houseid][address]);
hInfo[houseid][cost] = cache_get_field_content_int(0, "cost");
hInfo[houseid][Int] = cache_get_field_content_int(0, "Int");
hInfo[houseid][hX] = cache_get_field_content_float(0, "hX");
hInfo[houseid][hY] = cache_get_field_content_float(0, "hY");
hInfo[houseid][hZ] = cache_get_field_content_float(0, "hZ");
hInfo[houseid][tX] = cache_get_field_content_float(0, "tX");
hInfo[houseid][tY] = cache_get_field_content_float(0, "tY");
hInfo[houseid][tZ] = cache_get_field_content_float(0, "tZ");
hPickup[houseid] = CreateDynamicPickup(1273,1,hInfo[houseid][hX],hInfo[houseid][hY],hInfo[houseid][hZ]);
House[houseid] = CreateDynamic3DTextLabel(hInfo[houseid][address], COLOR_GREEN, hInfo[houseid][hX], hInfo[houseid][hY], hInfo[houseid][hZ], 50);
Houses++;
printf("%d Houses Have Been Loaded.",Houses);
}
return 1;
}