A 3D Text dosent shows up.
#1

I've created an "Stock" which supposed to create an house with 3D text, but somehow.
It creats the house perfectly(Non of the Stock's work), but dosent shows the 3D text label.

Here's the script:

Код:
stock Create3DHouse()
{
new string[ 128 ];
for(new h = 0; h < sizeof(Houses); h++)
{
    new NewHouseID = SpawnedHouses+1;
    if(Houses[h][HousePrice] == -1)
    {
    format(string, sizeof(string), "House %d", h);
    Create3DTextLabel(string,RED,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1);
    }
    else
    {
    format(string, sizeof(string), "House %d\n Price: %d", h, Houses[h][HousePrice]);
    Create3DTextLabel(string,ADMIN_GREEN,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0);
    }
      }
}
I would appericate any help, thanks =].
Reply
#2

Are you sure the Houses[ NewHouseID ][ hExteriorX/Y/Z ] variables are holding a valid value other than 0.00?

And your code may have a problem, depending if this was the way it was intended to operate. It will create a 3D Text Label for each of the 500 house slots.
Reply
#3

I dont know actually, I think I havent placed it in the correct place.

Here's a code, do you think I've placed it correctly?

Код:
if(!fexist(string))
	                	{
							Houses[NewHouseID][hInteriorID] = Player[playerid][hIntID];
							Houses[NewHouseID][hExteriorID] = Player[playerid][hExtID];
							Houses[NewHouseID][hInteriorX] = Player[playerid][hIntX];
							Houses[NewHouseID][hInteriorY] = Player[playerid][hIntY];
							Houses[NewHouseID][hInteriorZ] = Player[playerid][hIntZ];
							Houses[NewHouseID][hExteriorX] = Player[playerid][hExtX];
							Houses[NewHouseID][hExteriorY] = Player[playerid][hExtY];
							Houses[NewHouseID][hExteriorZ] = Player[playerid][hExtZ];
							format(Houses[NewHouseID][hOwner], 255, "Nobody");
							Houses[NewHouseID][LockStatus] = 0;
       						        Houses[NewHouseID][H3DText] = Create3DHouse();
							dini_Create(string);
							dini_IntSet(string, "InteriorID", Houses[NewHouseID][hInteriorID]);
							dini_FloatSet(string, "InteriorX", Houses[NewHouseID][hInteriorX]);
							dini_FloatSet(string, "InteriorY", Houses[NewHouseID][hInteriorY]);
							dini_FloatSet(string, "InteriorZ", Houses[NewHouseID][hInteriorZ]);

							dini_IntSet(string, "HousePrice", 0);

							dini_IntSet(string, "ExteriorID", 0);
							dini_FloatSet(string, "ExteriorX", Houses[NewHouseID][hExteriorX]);
							dini_FloatSet(string, "ExteriorY", Houses[NewHouseID][hExteriorY]);
							dini_FloatSet(string, "ExteriorZ", Houses[NewHouseID][hExteriorZ]);

							dini_IntSet(string, "VaultMoney", -1);
							
							dini_IntSet(string, "HouseCocaine", -1);
							dini_IntSet(string, "HousePot", -1);
							dini_IntSet(string, "HouseMaterials", -1);

							dini_Set(string, "Owner", "Nobody");

							dini_IntSet(string, "LockStatus", Houses[NewHouseID][LockStatus]);

	                		Player[playerid][HouseExterior]--;
	                		Player[playerid][HouseInterior]--;

	                		SpawnedHouses++;
	                		SendClientMessage(playerid, NICESKY, "Successfully created house!");
	                		SetPlayerInterior(playerid, Houses[NewHouseID][hExteriorID]);
	                		SetPlayerPos(playerid, Houses[NewHouseID][hExteriorX], Houses[NewHouseID][hExteriorY], Houses[NewHouseID][hExteriorZ]);
	                	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)