What the heck!, 3D on 3D (Create3DTextLabel)
#1

I was trying to create a 3DTextLabel for houses, actually succeed, but I dont know how to exchange the
Owned format with the 'For sale' format.
That's what I am getting though :


Here's the script which is incharge of 3D labels. :
pawn Код:
stock Create3DHouse()
{
    for(new NewHouseID; NewHouseID<sizeof(Houses); NewHouseID++)
    {
        if(!Houses[NewHouseID][hExteriorY]) continue;
        new string[ 96 ];
        if(strcmp(Houses[NewHouseID][hOwner], "Nobody", true) == 0)
        {
            format(string, sizeof(string), "[House] %d\n buy price: %d (/buyhouse)", NewHouseID, Houses[NewHouseID][HousePrice]);
            Create3DTextLabel(string,HOUSE_YSELL,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1);
        }
        else
        {
            format(string, sizeof(string), "[House]\n %d", NewHouseID);
            Create3DTextLabel(string,HOUSE_NSELL,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0);

        }
    }
    return 1;
}
Does anyone knows how to remove the Green format when the house has been buyed or delete th Red one when the house has been sold?

Thank you.
Reply
#2

well your making new onesw over top try going
pawn Код:
Update3DTextLabelText(Text:3D:id,color,text[]);
Reply
#3

Quote:
Originally Posted by (SF)Noobanatior
Посмотреть сообщение
well your making new onesw over top try going
pawn Код:
Update3DTextLabelText(Text:3D:id,color,text[]);
No because he wouldn't be creating the 3Dtext label.
pawn Код:
stock Create3DHouse()
{
    for(new NewHouseID; NewHouseID<sizeof(Houses); NewHouseID++)
    {
        if(!Houses[NewHouseID][hExteriorY]) continue;
        new string[ 96 ];
        if(strcmp(Houses[NewHouseID][hOwner], "Nobody", true) == 0)
        {
            format(string, sizeof(string), "[House] %d\n buy price: %d (/buyhouse)", NewHouseID, Houses[NewHouseID][HousePrice]);
        }
        else
        {
            format(string, sizeof(string), "[House]\n %d", NewHouseID);
        }
Create3DTextLabel(string,HOUSE_NSELL,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0);
    }
    return 1;
}
Reply
#4

FireCat, the only problem is.

That because of that, I will have only a each color, which is lame.
The buyable house will be in red, and the bought one also.

There's any another ideas?

And Noobanatior, thanks I will give it an immediate try.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)