SA-MP Forums Archive
3d text label wont show - 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)
+--- Thread: 3d text label wont show (/showthread.php?tid=662607)



3d text label wont show - enzulikeS - 06.01.2019

Code:
if(dialogid == DIALOG_GIFTBOXOB)
	{
    	if(!response) return 1;
    	{
    		new Float: pos[3]; new zzgQuery[256] = EOS;
    		new sssstring[256];
			GetPlayerPos(playerid, pos[0], pos[1], pos[2]);

			GiftBoxInfo[playerid][pGiftBoxOn] = 1;
		    SCM(playerid, -1, "Giftbox activated");
		    
		    GiftBoxInfo[playerid][pGiftBoxPosX] = pos[0];
		    GiftBoxInfo[playerid][pGiftBoxPosY] = pos[1];
		    GiftBoxInfo[playerid][pGiftBoxPosZ] = pos[2];
		    GiftBoxInfo[playerid][pGiftboxModel] = CreateObject(strval(inputtext), GiftBoxInfo[playerid][pGiftBoxPosX], GiftBoxInfo[playerid][pGiftBoxPosY], GiftBoxInfo[playerid][pGiftBoxPosZ], 0.00000, 0.00000, 0.00000);
		 
			format(sssstring, sizeof(sssstring), "TEST\nBani castigati: $%s\nExperienta castigate: %s", 
			FormatNumber(GiftBoxInfo[playerid][pGiftBoxMoney]), FormatNumber(GiftBoxInfo[playerid][pGiftBoxEXP]));
			giftlabel = CreateDynamic3DTextLabel(string, 0xFFFFFFFF, GiftBoxInfo[playerid][pGiftBoxPosX], GiftBoxInfo[playerid][pGiftBoxPosY], GiftBoxInfo[playerid][pGiftBoxPosZ], 25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
			
	    	mysql_format(SQL, zzgQuery, sizeof(zzgQuery), "INSERT INTO giftboxd (`GiftBoxOn`, `GiftboxModel`, `GiftboxPosX`, `GiftboxPosY`, `GiftboxPosZ`) VALUES ('1','%d', '%f', '%f', '%f')",strval(inputtext), GiftBoxInfo[playerid][pGiftBoxPosX], GiftBoxInfo[playerid][pGiftBoxPosY], GiftBoxInfo[playerid][pGiftBoxPosZ]);
		    mysql_tquery(SQL, zzgQuery, "", "");
		}
	}
this thing, why dont the label show?


Re: 3d text label wont show - rockys - 07.01.2019

you need include <streamer>


Re: 3d text label wont show - d1git - 07.01.2019

You are creating the label inside of the object - if you set the "testlos" parameter to false (0), you will see the label. If you do not want to set "testlos" parameter to false, consider moving the label above the object.

CreateDynamic3DTextLabel(const text[], color, Float: x, Float: y, Float: z, Float: drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0);


Re: 3d text label wont show - enzulikeS - 07.01.2019

Quote:
Originally Posted by d1git
View Post
You are creating the label inside of the object - if you set the "testlos" parameter to false (0), you will see the label. If you do not want to set "testlos" parameter to false, consider moving the label above the object.

CreateDynamic3DTextLabel(const text[], color, Float: x, Float: y, Float: z, Float: drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0);
thank you!