Create3DTextLabel problem
#1

Hey! I have a problem. If i buy a house the Create3DTextLabel don't change.
pawn Код:
new Text3D:housesale
new Text3D:houseinfo
for(new h = 0; h < sizeof(HouseInfo); h++)
    {
        if(HouseInfo[h][hOwned] == 0)
        {
            format(string4, sizeof(string4), "%s\nSale: %d Saki",HouseInfo[h][hDiscription],HouseInfo[h][hValue]);
            housesale = Create3DTextLabel(string4,0xF9A406FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],15,0,1);
        }
        else if(HouseInfo[h][hOwned] == 1)
        {

            format(string4, sizeof(string4), "%s\n Owner: %s",HouseInfo[h][hDiscription], HouseInfo[h][hOwner]);
            houseinfo = Create3DTextLabel(string4,0xF9A406FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],15,0,1);
        }
    }
I have tried Delete3DTextLabel in cmds like that /buyhouse and /sellhouse. I have got that when i use the buy cmd then the housesale do not delete and the i have two Create3DTextLabel. I somebody can me help the i will be happy. But now it is fucked up :S
Reply
#2

Can somebody help me wiht that?
Reply
#3

up ?
Reply
#4

Looks like you need to use arrays. Try this.
pawn Код:
new Text3D:housesale[sizeof(HouseInfo)];
new Text3D:houseinfo[sizeof(HouseInfo)];

for(new h = 0; h < sizeof(HouseInfo); h++)
{
    if(HouseInfo[h][hOwned] == 0)
    {
        format(string4, sizeof(string4), "%s\nSale: %d Saki",HouseInfo[h][hDiscription],HouseInfo[h][hValue]);
        housesale[h] = Create3DTextLabel(string4,0xF9A406FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],15,0,1);
    }
    else
    {
        format(string4, sizeof(string4), "%s\n Owner: %s",HouseInfo[h][hDiscription], HouseInfo[h][hOwner]);
        houseinfo[h] = Create3DTextLabel(string4,0xF9A406FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],15,0,1);
    }
}
Reply
#5

It doesn't work. But thanks. It looks like the first part of Sale freeze. But why? I dont no.
Reply
#6

https://sampwiki.blast.hk/wiki/Update3DTextLabelText
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)