14.07.2010, 10:10
I have a problem with deleting the 3DTextLabel's on my house system, the weird part is it's exact the same as my HQ system, the HQ system works but the house one doesn't, anyways:
Okay so at start of server I of course load the House System inside that I create a 3DTextLabel
Now when a player for example buys a house I made a timer for updating the house text:
The timer on /buyhouse
Okay heres the HouseText
Okay so it's like exact the same as the HQ one but doesn't work, however the HQ one works. When I buy a house or sell it it like just creates both of the 3DTextLabel's on the SpawnX,SpawnY,SpawnZ pos.
So I guess it's not deleting the right way.
Okay so at start of server I of course load the House System inside that I create a 3DTextLabel
pawn Код:
House = Create3DTextLabel(string,COLOR_PURPLE,HouseInfo[idx][SpawnX],HouseInfo[idx][SpawnY],HouseInfo[idx][SpawnZ],20.0,0,1);
The timer on /buyhouse
pawn Код:
SetTimer("HouseText",700,false);
pawn Код:
public HouseText()
{
Delete3DTextLabel(House);
new idx = 0;
while(idx < totalhouses)
{
new string[120];
if(HouseInfo[idx][Owned] == 1)
{
format(string,sizeof(string),"Name: %s",HouseInfo[idx][Name]);
House = Create3DTextLabel(string,COLOR_PURPLE,HouseInfo[idx][SpawnX],HouseInfo[idx][SpawnY],HouseInfo[idx][SpawnZ],20.0,0,1);
}
else if(HouseInfo[idx][Owned] == 0)
{
format(string,sizeof(string),"For Sale!\nName: %s\nPrice: %d",HouseInfo[idx][Name],HouseInfo[idx][Price]);
House = Create3DTextLabel(string,COLOR_PURPLE,HouseInfo[idx][SpawnX],HouseInfo[idx][SpawnY],HouseInfo[idx][SpawnZ],20.0,0,1);
}
idx++;
}
return 1;
}
So I guess it's not deleting the right way.