PlayerTextDraw not selectable
#1

Hello guys,
i've created a PlayerTextDraw, but it isn't clickable.

Code:
stock Load_TD(playerid)
{
	TD_Login[playerid][22] = CreatePlayerTextDraw(playerid, 317.333312, 226.918579, "Password");
	PlayerTextDrawLetterSize(playerid, TD_Login[playerid][22], 0.281333, 1.877927);
	PlayerTextDrawTextSize(playerid, TD_Login[playerid][22], 0.000000, 73.000000);
	PlayerTextDrawAlignment(playerid, TD_Login[playerid][22], 2);
	PlayerTextDrawColor(playerid, TD_Login[playerid][22], -1);
	PlayerTextDrawUseBox(playerid, TD_Login[playerid][22], 1);
	PlayerTextDrawBoxColor(playerid, TD_Login[playerid][22], 171);
	PlayerTextDrawSetShadow(playerid, TD_Login[playerid][22], 0);
	PlayerTextDrawBackgroundColor(playerid, TD_Login[playerid][22], 255);
	PlayerTextDrawFont(playerid, TD_Login[playerid][22], 1);
	PlayerTextDrawSetProportional(playerid, TD_Login[playerid][22], 1);
	PlayerTextDrawSetSelectable(playerid, TD_Login[playerid][22], true);
        return 1;
}
This will be load
Code:
OnPlayerConnect(playerid)
{
        for(new i = 0; i < 23; i++)
	{
	    PlayerTextDrawShow(playerid, PlayerText:TD_Login[playerid][i]);
	}
}
Then

Code:
OnPlayerRequestClass(playerid, classid)
{
	SelectTextDraw(playerid, 0xFF4040AA);
}
Code:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
	if(_:playertextid != INVALID_TEXT_DRAW)
	{
		if(playertextid == TD_Login[playerid][22])
    	{
			SendClientMessage(playerid, COLOR_GREEN, "yes");
    	}
	}
	else
	{
	    SendClientMessage(playerid, COLOR_GREEN, "no");
	}
	return 1;
}
maybe someone can help me.
Reply
#2

IIRC the text size can't be 0.0.
Reply
#3

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)