22.07.2011, 21:25
I am scripting all day long to get this working, but somehow, its just wont work! -.-
I dont know what's wrong with it, I've asked many people which helped me before, but it is too much questions, so I guess its arrogant by me =[.
Anyways, the script is supposed to Create3DTextLabel information for a house if its not exsiting already and when someone /buyhouse its supposed to update the TextLabel into a red colour and another string, but this this! dosent works, it creates new 3DTextLabel over the exsiting one =[!
Seriously, I dont know why it is not working, I think it might be arrays problem or if and elses problem. - Just an opinion of mine.
I am actually a beginner so I do not have much experience.
Anyways, what I am trying to say its that I could use some help as for making this work properly, because it dosent works as its supposed to work - good an properly.
Here's an image which showing you guys, what's the actual problem ( creating a new 3D text instead of updating the exsiting one )
Here is my script that is incharge of the 3DTextLabels :
What I am willing to do, is to get this working properly, and get some assistance from you guys.
Please, every assistance or suggestion or even a post will be most appericated, thank you.
I dont know what's wrong with it, I've asked many people which helped me before, but it is too much questions, so I guess its arrogant by me =[.
Anyways, the script is supposed to Create3DTextLabel information for a house if its not exsiting already and when someone /buyhouse its supposed to update the TextLabel into a red colour and another string, but this this! dosent works, it creates new 3DTextLabel over the exsiting one =[!
Seriously, I dont know why it is not working, I think it might be arrays problem or if and elses problem. - Just an opinion of mine.
I am actually a beginner so I do not have much experience.
Anyways, what I am trying to say its that I could use some help as for making this work properly, because it dosent works as its supposed to work - good an properly.
Here's an image which showing you guys, what's the actual problem ( creating a new 3D text instead of updating the exsiting one )
Here is my script that is incharge of the 3DTextLabels :
pawn Код:
stock Create3DHouse()
{
for(new NewHouseID; NewHouseID<sizeof(Houses); NewHouseID++)
{
if(!Houses[NewHouseID][hExteriorY]) continue;
new string[ 96 ], Text3D:FoSale[4500], hExsitsS[4500], hExsitsN[4500];
if(strcmp(Houses[NewHouseID][hOwner], "Nobody", true) == 0)
{
format(string, sizeof(string), "[House] %d\n buy price: %d (/buyhouse)", NewHouseID, Houses[NewHouseID][HousePrice]);
if(hExsitsN[NewHouseID] == 1)
{
Update3DTextLabelText(FoSale[NewHouseID], HOUSE_YSELL, string);
hExsitsS[NewHouseID] = 1;
} else {
FoSale[NewHouseID] = Create3DTextLabel(string, HOUSE_YSELL, Houses[NewHouseID][hExteriorX], Houses[NewHouseID][hExteriorY], Houses[NewHouseID][hExteriorZ], 30.0, 0, 1);
hExsitsS[NewHouseID] = 1; }
} else {
format(string, sizeof(string), "[House]\n %d", NewHouseID);
if(hExsitsS[NewHouseID] == 1)
{
Update3DTextLabelText(FoSale[NewHouseID], HOUSE_NSELL, string);
hExsitsN[NewHouseID] = 1;
}
else
{
FoSale[NewHouseID] = Create3DTextLabel(string, HOUSE_NSELL, Houses[NewHouseID][hExteriorX], Houses[NewHouseID][hExteriorY], Houses[NewHouseID][hExteriorZ], 30.0, 0, 1);
hExsitsN[NewHouseID] = 1;
}
}
}
Please, every assistance or suggestion or even a post will be most appericated, thank you.