22.07.2011, 00:34
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. :
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.
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;
}
Thank you.