Destroy 3dtext help
#1

Hi,i have a problem with 3d text,im using gtarp mod and i wont to make when player buy house the 3d text change to his name and other things and its work...but when player buy house i can't destroy first 3dtext "House for sale"...blabla..

OnGameModeInit
Код:
	for(new h = 0; h < sizeof(HouseInfo); h++)
	{
		if(HouseInfo[h][hOwned] == 0)
		{
            new hnxx[256];
		    format(hnxx, sizeof(hnxx), ""WHITE"[NA PRODAJU]\n"GREEN"Cena: "WHITE"$ %d\n"GREEN"Potreban Level: "WHITE"%d\n"GREEN"Opis: "WHITE"%s\n"GREEN"Da kupite kucajte "WHITE"/buyhouse",HouseInfo[h][hValue],HouseInfo[h][hLevel],HouseInfo[h][hDiscription]);
		    housesale = Create3DTextLabel(hnxx,COLOR_GREEN,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);
			AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
			pickups++;
		}
		if(HouseInfo[h][hOwned] == 1)
		{
            new hnxxx[256];
		    format(hnxxx, sizeof(hnxxx), ""GREEN"Vlasnik: "GREEN"%s\n"GREEN"Opis: "WHITE"%s\n"GREEN"Potreban Level: "WHITE"%d\n"GREEN"Rent: "WHITE"%s\n"GREEN"Interier: "GREEN"%d",HouseInfo[h][hOwner],HouseInfo[h][hDiscription],HouseInfo[h][hLevel],HouseInfo[h][hRent],HouseInfo[h][hInt]);
		    housesalee = Create3DTextLabel(hnxxx,COLOR_GREEN,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);
			AddStaticPickup(1318, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
			pickups++;
		}
	}
Код:
public OnPropTextdrawUpdate(update, id)
{
	if(update == 1)
	{
		for(new h = 0; h < sizeof(HouseInfo); h++)
		{
			if(HouseInfo[h][hOwned] == 0)
			{
        	    new hnxx[256];
			    format(hnxx, sizeof(hnxx), ""WHITE"[NA PRODAJU]\n"GREEN"Cena: "WHITE"$ %d\n"GREEN"Potreban Level: "WHITE"%d\n"GREEN"Opis: "WHITE"%s\n"GREEN"Da kupite kucajte "WHITE"/buyhouse",HouseInfo[h][hValue],HouseInfo[h][hLevel],HouseInfo[h][hDiscription]);
			    housesale = Create3DTextLabel(hnxx,COLOR_GREEN,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);
				AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
				pickups++;
			}
			if(HouseInfo[h][hOwned] == 1)
			{
        	    new hnxxx[256];
			    format(hnxxx, sizeof(hnxxx), ""GREEN"Vlasnik: "GREEN"%s\n"GREEN"Opis: "WHITE"%s\n"GREEN"Potreban Level: "WHITE"%d\n"GREEN"Rent: "WHITE"%s\n"GREEN"Interier: "GREEN"%d",HouseInfo[h][hOwner],HouseInfo[h][hDiscription],HouseInfo[h][hLevel],HouseInfo[h][hRent],HouseInfo[h][hInt]);
			    housesalee = Create3DTextLabel(hnxxx,COLOR_GREEN,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);
				AddStaticPickup(1318, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
				pickups++;
	    	}
		}
	}
	return 1;
}
So i just wont to destroy 3dtext "House for sale..." when player buy house..i think you understand what im talking about,if you don't understand me i will put a picture..thanks in advance
Reply
#2

Delete3DTextLabel(Taxtlabelid);
Reply
#3

ohh i forgot to say,i put this Delete3DTextLabel(Text3D:housesale); in /buyhouse command..
Reply
#4

PHP код:
public OnPropTextdrawUpdate(updateid)
{
    if(
update == 1)
    {
        for(new 
0sizeof(HouseInfo); h++)
        {
            if(
HouseInfo[h][hOwned] == 0)
            {
                new 
hnxx[256];
                
format(hnxxsizeof(hnxx), ""WHITE"[NA PRODAJU]\n"GREEN"Cena: "WHITE"$ %d\n"GREEN"Potreban Level: "WHITE"%d\n"GREEN"Opis: "WHITE"%s\n"GREEN"Da kupite kucajte "WHITE"/buyhouse",HouseInfo[h][hValue],HouseInfo[h][hLevel],HouseInfo[h][hDiscription]);
                            
Delete3DTextLabel(housesale);
                
housesale Create3DTextLabel(hnxx,COLOR_GREEN,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);
                
AddStaticPickup(12732HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
                
pickups++;
            }
            if(
HouseInfo[h][hOwned] == 1)
            {
                new 
hnxxx[256];
                
format(hnxxxsizeof(hnxxx), ""GREEN"Vlasnik: "GREEN"%s\n"GREEN"Opis: "WHITE"%s\n"GREEN"Potreban Level: "WHITE"%d\n"GREEN"Rent: "WHITE"%s\n"GREEN"Interier: "GREEN"%d",HouseInfo[h][hOwner],HouseInfo[h][hDiscription],HouseInfo[h][hLevel],HouseInfo[h][hRent],HouseInfo[h][hInt]);
                            
Delete3DTextLabel(housesale);
                
housesalee Create3DTextLabel(hnxxx,COLOR_GREEN,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);
                
AddStaticPickup(13182HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
                
pickups++;
            }
        }
    }
    return 
1;

Reply
#5

@BRICS
not work

PHP код:
    if(update == 1)
    {
        for(new 
0sizeof(HouseInfo); h++)
        {
            if(
HouseInfo[h][hOwned] == 0)
            {
                new 
hnxx[256];
                
Delete3DTextLabel(Text3D:housesalee);
                
format(hnxxsizeof(hnxx), ""WHITE"[NA PRODAJU]\n"GREEN"Cena: "WHITE"$ %d\n"GREEN"Potreban Level: "WHITE"%d\n"GREEN"Opis: "WHITE"%s\n"GREEN"Da kupite kucajte "WHITE"/buyhouse",HouseInfo[h][hValue],HouseInfo[h][hLevel],HouseInfo[h][hDiscription]);
                
housesale Create3DTextLabel(hnxx,COLOR_GREEN,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);
                
AddStaticPickup(12732HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
                
pickups++;
            }
            if(
HouseInfo[h][hOwned] == 1)
            {
                new 
hnxxx[256];
                
Delete3DTextLabel(Text3D:housesale);
                
format(hnxxxsizeof(hnxxx), ""GREEN"Vlasnik: "GREEN"%s\n"GREEN"Opis: "WHITE"%s\n"GREEN"Potreban Level: "WHITE"%d\n"GREEN"Rent: "WHITE"%s\n"GREEN"Interier: "GREEN"%d",HouseInfo[h][hOwner],HouseInfo[h][hDiscription],HouseInfo[h][hLevel],HouseInfo[h][hRent],HouseInfo[h][hInt]);
                
housesalee Create3DTextLabel(hnxxx,COLOR_GREEN,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);
                
AddStaticPickup(13182HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
                
pickups++;
            }
        }
    } 
Reply
#6

bump...can someone help me
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)