04.11.2009, 20:11
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()
Now if player buy home: (/buyhouse)
If player sell house (/sellhouse)
What is wrong?
Thanks.
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 } }
Код:
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]);
Код:
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]);
Thanks.