3dtextlabel won't update
#1

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.



Reply
#2

Thanks. Fixed.
Reply
#3

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)