// 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);
}
}
}
}
}
// 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(Label3[h]);
Delete3DTextLabel(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(Label1[h]);
Delete3DTextLabel(Label3[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(Label1[h]);
Delete3DTextLabel(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);
}
}
}
}
}
Delete3DTextLabel(Label1[h]);
Delete3DTextLabel(Text3D:Label1[h]);
Assim nao dб, os textos3D nao aparecem com estas:
pawn Код:
|
wtf digo eu porque se definir Delete3DTextLabel(Label1[h]); ou Delete3DTextLabel(Text3D:Label1[h]); os textos nao aparecem, queria era resolver isso mas sem estar definido os Delete3DTextLabel os textos3D dao bem tirando parte que ficam uns em cima dos outros ao actualizar a ID da casa
|
new Text3D:Label1[MAX_CASAS]; |
// Entao...
new Text3D:Label1; // - so aparece em algumas casas
new Text3D:Label1[MAX_CASAS]; // - aparece todas as casas
/*Com*/ Delete3DTextLabel(Label1[h]); Delete3DTextLabel(Text3D:Label1[h]); // - nao aparece em nenhuma casa
/*Sem*/ Delete3DTextLabel(Label1[h]);Delete3DTextLabel(Text3D:Label1[h]); // - textos aparecem mas se actualizar algo o texto antigo fica la e o novo fica por cima do antigo