SA-MP Forums Archive
3dtextlabel won't update - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 3dtextlabel won't update (/showthread.php?tid=106673)



3dtextlabel won't update - Toney - 04.11.2009

Hi everyone. I have problem with update 3d text label when i buy home, it doesn't updating.

Here my code:

new out2[128];
new out3[128];
new Text3D:SM1;


public OnGameModeInit()

Код:
for(new h = 0; h < sizeof(HouseInfo); h++)
{
SM1 = Create3DTextLabel(out3,0x008080FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],40.0,0);//Works fine
format(out2,128,"House owner: %s\nRent home %d$\nLevel: %d",HouseInfo[h][hOwner],HouseInfo[h][hRent],HouseInfo[h][hLevel]);
format(out3,128,"Name: %s\nCost: %d$\nLevel: %d",HouseInfo[h][hDiscription],HouseInfo[h][hValue],HouseInfo[h][hLevel]);
if(HouseInfo[h][hOwned] == 0)
{
AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
pickups++;
}
if(HouseInfo[h][hOwned] == 1)
{
AddStaticPickup(1318, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
pickups++;
Update3DTextLabelText(Text3D:SM1, COLOR_WHITE, out2);//Works fine
}
}
Now if player buy home: (/buyhouse)

Код:
Update3DTextLabelText(Text3D:SM1, COLOR_WHITE, out2);
format(out2,128,"House owner: %s\nRent home %d$\nLevel: %d",HouseInfo[h][hOwner],HouseInfo[h][hRent],HouseInfo[h][hLevel]);
If player sell house (/sellhouse)

Код:
Update3DTextLabelText(Text3D:SM1, COLOR_WHITE, out3);
format(out3,128,"Name: %s\nCost: %d$\nLevel: %d",HouseInfo[h][hDiscription],HouseInfo[h][hValue],HouseInfo[h][hLevel]);[hValue],HouseInfo[house][hLevel]);
What is wrong?

Thanks.






Re: 3dtextlabel won't update - Toney - 04.11.2009

Thanks. Fixed.


Re: 3dtextlabel won't update - thimo - 07.11.2009

can u help me with 3DTextLabels i dont know how to use.


Re: 3dtextlabel won't update - Correlli - 07.11.2009

Quote:
Originally Posted by thimo
can u help me with 3DTextLabels i dont know how to use.
Check the wiki.