10.04.2012, 15:19
O problema e o seguinte, quando uso o Delete3DTextLabel(Text3D:Label3[h]); ou Delete3DTextLabel(Label3[h]); no script o texto nao aparece nos Pickups na casa a dizer preзo dono etc, mas quando meto //Delete3DTextLabel(Label3[h]); "sem variavel Delete3DTextLabel activada" os textos ja aparecem so que se actualizar qualquer coisa como dono, preзo, aluguer da casa ficam os textos cima um dos outros
Alguem podera ajudar por favor?
Alguem podera ajudar por favor?
pawn Код:
// Topo
#define MAX_CASAS 100
new Text3D:Label3[MAX_CASAS];
new Text3D:Label2[MAX_CASAS];
new Text3D:Label1[MAX_CASAS];
// no public PickupGametexts()
for(new h = 0; h < sizeof(Houses); h++)
{
if (PlayerToPoint(20.0, i,Houses[h][EnterX], Houses[h][EnterY], Houses[h][EnterZ]))
{
if(Houses[h][HousePrice] != 0)
{
if(Houses[h][Owned] == 0)
{
// Delete3DTextLabel(Text3D:Label3[h]);
// Delete3DTextLabel(Text3D:Label2[h]);
new String1[256];
new houselocation[MAX_ZONE_NAME];
GetCoords2DZone(Houses[h][EnterX],Houses[h][EnterY], houselocation, MAX_ZONE_NAME);
format(String1,sizeof(String1),"Esta casa esta para venda! \n Morada: %d %s \n Descricao: %s \n Preco: $%d",h,houselocation,Houses[h][Description],Houses[h][HousePrice]);
Label1[h] = Create3DTextLabel(String1 ,COLOR_GRAD1,Houses[h][EnterX], Houses[h][EnterY], Houses[h][EnterZ],20.0, 0, 1);
}
else
{
if(Houses[h][Rentable] == 1)
{
// Delete3DTextLabel(Text3D:Label3[h]);
// Delete3DTextLabel(Text3D:Label1[h]);
new String2[256];
new houselocation[MAX_ZONE_NAME];
GetCoords2DZone(Houses[h][EnterX],Houses[h][EnterY], houselocation, MAX_ZONE_NAME);
format(String2,sizeof(String2),"Morada: %d %s \n Proprietario: %s \n Descricao: %s \n Preco de aluguer: $%d",h,houselocation,Houses[h][Owner],Houses[h][Description],Houses[h][RentCost]);
Label2[h] = Create3DTextLabel(String2 ,COLOR_GRAD1,Houses[h][EnterX], Houses[h][EnterY], Houses[h][EnterZ],20.0, 0, 1);
}
else
{
// Delete3DTextLabel(Text3D:Label1[h]);
// Delete3DTextLabel(Text3D:Label2[h]);
new String3[256];
new houselocation[MAX_ZONE_NAME];
GetCoords2DZone(Houses[h][EnterX],Houses[h][EnterY], houselocation, MAX_ZONE_NAME);
format(String3,sizeof(String3),"Morada: %d %s \n Proprietario: %s \n Descricao: %s",h,houselocation,Houses[h][Owner],Houses[h][Description]);
Label3[h] = Create3DTextLabel(String3 ,COLOR_GRAD1,Houses[h][EnterX], Houses[h][EnterY], Houses[h][EnterZ],20.0, 0, 1);
}
}
}
}
}