Delete3DTextLabel, It is the script's problem or Delete3DTextLabel's?
#1

I been trying to fix this for more then 6 hours.
Why dosent it working as its supposed to work? :

Defining new Text3D variables:
pawn Код:
new Text3D:LabelS, Text3D:LabelN;
Setting that the Variable LabelS/LabelN = Create3DTextLabel:
LabelS -
pawn Код:
LabelS = Create3DTextLabel(string,HOUSE_YSELL,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1);
LabelN -
pawn Код:
LabelN = Create3DTextLabel(string,HOUSE_NSELL,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1);
Attempting to delete LabelN/LabelS.
LabelS -
pawn Код:
Delete3DTextLabel(LabelS);
LabelN -
pawn Код:
Delete3DTextLabel(LabelN);
The whole script that connected to this, incase of neccessary:
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)