22.07.2011, 16:06
I been trying to fix this for more then 6 hours.
Why dosent it working as its supposed to work? :
Defining new Text3D variables:
Setting that the Variable LabelS/LabelN = Create3DTextLabel:
LabelS -
LabelN -
Attempting to delete LabelN/LabelS.
LabelS -
LabelN -
The whole script that connected to this, incase of neccessary:
Why dosent it working as its supposed to work? :
Defining new Text3D variables:
pawn Код:
new Text3D:LabelS, Text3D:LabelN;
LabelS -
pawn Код:
LabelS = Create3DTextLabel(string,HOUSE_YSELL,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1);
pawn Код:
LabelN = Create3DTextLabel(string,HOUSE_NSELL,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1);
LabelS -
pawn Код:
Delete3DTextLabel(LabelS);
pawn Код:
Delete3DTextLabel(LabelN);
pawn Код:
stock Create3DHouse()
{
for(new NewHouseID; NewHouseID<sizeof(Houses); NewHouseID++)
{
if(!Houses[NewHouseID][hExteriorY]) continue;
new string[ 96 ],HouseForSale, HouseNotForSale, WasFSell, WasntFSell;
new Text3D:LabelS, Text3D:LabelN;
if(strcmp(Houses[NewHouseID][hOwner], "Nobody", true) == 0)
{
format(string, sizeof(string), "[House] %d\n buy price: %d (/buyhouse)", NewHouseID, Houses[NewHouseID][HousePrice]);
}
else
{
format(string, sizeof(string), "[House]\n %d", NewHouseID);
HouseNotForSale = 1;
WasntFSell = 1;
}
if(HouseForSale == 1)
{
WasFSell = 1;
if(WasntFSell == 1)
{
Delete3DTextLabel(LabelN);
WasntFSell = 0;
}
HouseNotForSale = 0;
LabelS = Create3DTextLabel(string,HOUSE_YSELL,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1);
}
else if(HouseNotForSale == 1)
{
HouseNotForSale = 1;
WasntFSell = 1;
if(WasFSell == 1)
{
Delete3DTextLabel(LabelS);
WasFSell = 0;
}
LabelN = Create3DTextLabel(string,HOUSE_NSELL,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1);
HouseForSale = 0;
}
}
return 1;
}