3D Text Label will not display after loading - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 3D Text Label will not display after loading (
/showthread.php?tid=521195)
3D Text Label will not display after loading -
willsuckformoney - 22.06.2014
So in my desperate attempts to fix this, I have tried various things and still cannot succeed. Any help is accepted, thanks in advance. I have the pawn code so you guys can see what I'm doing wrong, It's MySQL.
pawn Код:
stock LoadHouses()
{
new query[300],query2[30],save[20];
format(query2,sizeof(query2),"SELECT Houses FROM housedata WHERE ID = 1");
mysql_query(query2);
mysql_store_result();
mysql_fetch_field_row(save, "Houses"); Houses = strval(save);
mysql_free_result();
for(new h = 0; h < Houses; h++)
{
format(query,sizeof(query),"SELECT * FROM housedata WHERE ID = %d",h);
mysql_query(query);
mysql_store_result();
while(mysql_fetch_row_format(query,"|"))
{
mysql_fetch_field_row(save, "ID"); HouseInfo[h][ID] = strval(save);
mysql_fetch_field_row(save, "owned"); HouseInfo[h][owned] = strval(save);
mysql_fetch_field_row(save, "owner"); HouseInfo[h][owner] = strval(save);
mysql_fetch_field_row(save, "X"); HouseInfo[h][X] = strval(save);
mysql_fetch_field_row(save, "Y"); HouseInfo[h][Y] = strval(save);
mysql_fetch_field_row(save, "Z"); HouseInfo[h][Z] = strval(save);
mysql_fetch_field_row(save, "RX"); HouseInfo[h][RX] = strval(save);
mysql_fetch_field_row(save, "RY"); HouseInfo[h][RY] = strval(save);
mysql_fetch_field_row(save, "RZ"); HouseInfo[h][RZ] = strval(save);
mysql_fetch_field_row(save, "interior"); HouseInfo[h][Int] = strval(save);
mysql_fetch_field_row(save, "vworld"); HouseInfo[h][vWorld] = strval(save);
mysql_fetch_field_row(save, "cost"); HouseInfo[h][Cost] = strval(save);
mysql_fetch_field_row(save, "street"); HouseInfo[h][Street] = strval(save);
mysql_fetch_field_row(save, "pID"); HouseInfo[h][pID] = strval(save);
mysql_fetch_field_row(save, "Houses"); Houses = strval(save);
}
mysql_free_result();
new STREET[24]; format(STREET,24,"%s",HouseInfo[h][Street]);
HouseInfo[h][pID] = CreateDynamicPickup(1273,1,HouseInfo[h][X],HouseInfo[h][Y],HouseInfo[h][Z]);
HouseInfo[h][street] = CreateDynamic3DTextLabel(STREET,blue,HouseInfo[h][X],HouseInfo[h][Y],HouseInfo[h][Z],25);
}
printf("%d Houses Loaded From MySQL Database",Houses);
return 1;
}
Re: 3D Text Label will not display after loading -
Jack_Leslie - 22.06.2014
Try adding 0.4 onto the Z coordinate
pawn Код:
HouseInfo[h][street] = CreateDynamic3DTextLabel(STREET,blue,HouseInfo[h][X],HouseInfo[h][Y],HouseInfo[h][Z]+0.4,25);
And make sure under your houseinfo enum that it's a Text3D, e.g. Text3D

treet
Re: 3D Text Label will not display after loading -
willsuckformoney - 22.06.2014
I do have the enum set up correct and I tried adding the +0.4 but it still did not work. It still creates the pickup though
Re: 3D Text Label will not display after loading -
Jack_Leslie - 22.06.2014
Try deleting the text label before it re-creates it.
Re: 3D Text Label will not display after loading -
Threshold - 22.06.2014
What's your definition of "blue"?