SA-MP Forums Archive
A 3D Text dosent shows up. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: A 3D Text dosent shows up. (/showthread.php?tid=270535)



A 3D Text dosent shows up. - Ben7544 - 20.07.2011

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 =].


Re: A 3D Text dosent shows up. - Grim_ - 20.07.2011

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.


Re: A 3D Text dosent shows up. - Ben7544 - 20.07.2011

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]);
	                	}