textdraw
#1

everytime i create textdraw it gets fucked up, when i click on the box it should work but it doesn't here is my codes
also look on this picture Empty Slot the one at the buttom it's different and it's the same color as the others
http://prntscr.com/7sxgdo

please tell me what i have to do -_-

Код:
	PlayerData[playerid][pTextdraws][0] = CreatePlayerTextDraw(playerid, 403.522705, 115.250000, "_");//whitebox
	PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][0], 255);
	PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][0], 1);
	PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][0], 0.000000, 24.831480);
	PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][0], -1);
	PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][0], 0);
	PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][0], 1);
	PlayerTextDrawSetShadow(playerid, PlayerData[playerid][pTextdraws][0], 1);
	PlayerTextDrawUseBox(playerid, PlayerData[playerid][pTextdraws][0], 1);
	PlayerTextDrawBoxColor(playerid, PlayerData[playerid][pTextdraws][0], 1717986918);
	PlayerTextDrawTextSize(playerid, PlayerData[playerid][pTextdraws][0], 233.197662, 0.000000);
	PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][0], 0);

	PlayerData[playerid][pTextdraws][1] = CreatePlayerTextDraw(playerid, 320.000183, 120.166664, "My Characters");
	PlayerTextDrawAlignment(playerid, PlayerData[playerid][pTextdraws][1], 2);
	PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][1], 255);
	PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][1], 0);
	PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][1], 0.449999, 1.600000);
	PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][1], -65281);
	PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][1], 1);
	PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][1], 1);
	PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][1], 0);

	PlayerData[playerid][pTextdraws][2] = CreatePlayerTextDraw(playerid, 394.152343, 166.000015, "_");//selectableone
	PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][2], 255);
	PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][2], 1);
	PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][2], 0.000000, 2.636668);
	PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][2], -1);
	PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][2], 0);
	PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][2], 1);
	PlayerTextDrawSetShadow(playerid, PlayerData[playerid][pTextdraws][2], 1);
	PlayerTextDrawUseBox(playerid, PlayerData[playerid][pTextdraws][2], 1);
	PlayerTextDrawBoxColor(playerid, PlayerData[playerid][pTextdraws][2], -205);
	PlayerTextDrawTextSize(playerid, PlayerData[playerid][pTextdraws][2], 243.973648, 0.000000);
	PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][2], 1);

	PlayerData[playerid][pTextdraws][3] = CreatePlayerTextDraw(playerid, 394.152343, 226.666625, "_");//selectableone
	PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][3], 255);
	PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][3], 1);
	PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][3], 0.000000, 2.636668);
	PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][3], -1);
	PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][3], 0);
	PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][3], 1);
	PlayerTextDrawSetShadow(playerid, PlayerData[playerid][pTextdraws][3], 1);
	PlayerTextDrawUseBox(playerid, PlayerData[playerid][pTextdraws][3], 1);
	PlayerTextDrawBoxColor(playerid, PlayerData[playerid][pTextdraws][3], -205);
	PlayerTextDrawTextSize(playerid, PlayerData[playerid][pTextdraws][3], 243.973648, 0.000000);
	PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][3], 1);

	PlayerData[playerid][pTextdraws][4] = CreatePlayerTextDraw(playerid, 394.152343, 285.333221, "_");//selectableone
	PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][4], 255);
	PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][4], 1);
	PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][4], 0.000000, 2.636668);
	PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][4], -1);
	PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][4], 0);
	PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][4], 1);
	PlayerTextDrawSetShadow(playerid, PlayerData[playerid][pTextdraws][4], 1);
	PlayerTextDrawUseBox(playerid, PlayerData[playerid][pTextdraws][4], 1);
	PlayerTextDrawBoxColor(playerid, PlayerData[playerid][pTextdraws][4], -205);
	PlayerTextDrawTextSize(playerid, PlayerData[playerid][pTextdraws][4], 243.973648, 0.000000);
	PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][4], 1);

	PlayerData[playerid][pTextdraws][5] = CreatePlayerTextDraw(playerid, 317.189025, 171.500000, "Empty Slot");
	PlayerTextDrawAlignment(playerid, PlayerData[playerid][pTextdraws][5], 2);
	PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][5], 255);
	PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][5], 1);
	PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][5], 0.353953, 0.905833);
	PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][5], -1);
	PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][5], 1);
	PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][5], 1);
	PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][5], 0);

	PlayerData[playerid][pTextdraws][6] = CreatePlayerTextDraw(playerid, 317.189025, 232.166641, "Empty Slot");
	PlayerTextDrawAlignment(playerid, PlayerData[playerid][pTextdraws][6], 2);
	PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][6], 255);
	PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][6], 1);
	PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][6], 0.353953, 0.905833);
	PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][6], -1);
	PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][6], 1);
	PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][6], 1);
	PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][6], 0);

	PlayerData[playerid][pTextdraws][7] = CreatePlayerTextDraw(playerid, 317.189025, 293.416595, "Empty Slot");
	PlayerTextDrawAlignment(playerid, PlayerData[playerid][pTextdraws][7], 2);
	PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][7], 255);
	PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][7], 1);
	PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][7], 0.353953, 0.905833);
	PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][7], -1);
	PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][7], 1);
	PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][7], 1);
	PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][7], 0);
	
	PlayerData[playerid][pTextdraws][8] = CreatePlayerTextDraw(playerid, 399.774505, 119.916664, "_");// Black Box
	PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][8], 0.000000, 23.859260);
	PlayerTextDrawTextSize(playerid, PlayerData[playerid][pTextdraws][8], 236.945831, 0.000000);
	PlayerTextDrawAlignment(playerid, PlayerData[playerid][pTextdraws][8], 1);
	PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][8], 0);
	PlayerTextDrawUseBox(playerid, PlayerData[playerid][pTextdraws][8], true);
	PlayerTextDrawBoxColor(playerid, PlayerData[playerid][pTextdraws][8], 102);
	PlayerTextDrawSetShadow(playerid, PlayerData[playerid][pTextdraws][8], 0);
	PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][8], 0);
	PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][8], 0);
	PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][8], 1);
	PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][8], 0);
i know you'll ask for, did u make it OnPlayerClickTextdraw, yeah i did look

Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
	if (!Dialog_Opened(playerid))
	{
		if (!PlayerData[playerid][pCharacter])
		{
			if (playertextid == PlayerData[playerid][pTextdraws][2])
				SelectCharacter(playerid, 1);

			else if (playertextid == PlayerData[playerid][pTextdraws][3])
				SelectCharacter(playerid, 2);

			else if (playertextid == PlayerData[playerid][pTextdraws][4])
				SelectCharacter(playerid, 3);
		}
         }
         return 1;
}
Reply
#2

For the selectable box, have you seen my reply in your other recent topic? As for why is the "Empty Slot" text white and others are greyish, it's because textdraws need to be shown in specific order (not sure if they also need to be created that way). If you want the text to be white, first create and show the boxes, then create other text draws with informative text.
Reply
#3

that's what i did mate, first creating boxes second texts, also have a look here

TextDrawDestroy: Destroy a textdraw.
TextDrawColor: Set the color of the text in a textdraw.
TextDrawBoxColor: Set the color of the box in a textdraw.
TextDrawBackgroundColor: Set the background color of a textdraw.
TextDrawAlignment: Set the alignment of a textdraw.
TextDrawFont: Set the font of a textdraw.
TextDrawLetterSize: Set the letter size of the text in a textdraw.
TextDrawTextSize: Set the size of a textdraw box.
TextDrawSetOutline: Choose whether the text has an outline.
TextDrawSetShadow: Toggle shadows on a textdraw.
TextDrawSetProportional: Scale the text spacing in a textdraw to a proportional ratio.
TextDrawUseBox: Toggle if the textdraw has a box or not.
TextDrawSetString: Set the text in an existing textdraw.

TextDrawShowForPlayer: Show a textdraw for a certain player.
TextDrawHideForPlayer: Hide a textdraw for a certain player.
TextDrawShowForAll: Show a textdraw for all players.
TextDrawHideForAll: Hide a textdraw for all players.

i made it 1 too
Reply
#4

so
Reply
#5

again
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)