TextDrawClickable doesn't work..
#1

Hi !

I have try to create a textdraw clickable but i have a problems.. I can't click on the textdraw with the textdraw mouse when i go on the textdraw : no hover, and when i click it's don't work ...

Code :
Код:
Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 668.399658, 2.246673, "usebox");
		   	PlayerTextDrawTextSize(playerid,Textdraw0[playerid], 485.200073, 0.000000);
			//PlayerTextDrawTextSize(playerid, Textdraw0[playerid], 485.200073, 0.000000);
			PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 1);
			PlayerTextDrawColor(playerid, Textdraw0[playerid], 0);
			PlayerTextDrawUseBox(playerid, Textdraw0[playerid], true);
			PlayerTextDrawBoxColor(playerid, Textdraw0[playerid], 102);
			PlayerTextDrawSetShadow(playerid, Textdraw0[playerid], 0);
			PlayerTextDrawSetOutline(playerid, Textdraw0[playerid], 0);
			PlayerTextDrawFont(playerid, Textdraw0[playerid], 0);
			PlayerTextDrawSetSelectable(playerid,Textdraw0[playerid], 1);
			PlayerTextDrawShow(playerid, Textdraw0[playerid]);
and

Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    if(playertextid == Textdraw0[playerid])
    {
         SendClientMessage(playerid, 0xFFFFFFAA, "You clicked on a textdraw.");
         CancelSelectTextDraw(playerid);
    }
    return 1;
}
Please help me
Reply
#2

Up Please
Reply
#3

Clickable area is defined by TextDrawTextSize. You have set the height to 0, so no clickable area. Secondly, you forgot TextDrawSetSelectable.
Reply
#4

I don't have forgot the callback selectable : PlayerTextDrawSetSelectable(playerid,Textdraw0[playerid], 1);

I have try to size the height to 10 and it's doesn't work :/
Reply
#5

Up

Fixed !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)