open.mp forum
[Pawn] PlayerTextDrawSetSelectable [SOLVED] - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] PlayerTextDrawSetSelectable [SOLVED] (/showthread.php?tid=1649)



PlayerTextDrawSetSelectable [SOLVED] - Torque - 2021-02-07

I don't understand why the textdraw isn't selectable. Here's my script for reference. I don't even get a hover color. All of the SELECT buttons should be selectable but they're not.



Code:
CharSelect[playerid][10] = CreatePlayerTextDraw(playerid, 170.000000, 260.000000, "SELECT");

PlayerTextDrawAlignment(playerid, CharSelect[playerid][10], 2);

PlayerTextDrawBackgroundColor(playerid, CharSelect[playerid][10], 255);

PlayerTextDrawFont(playerid, CharSelect[playerid][10], 1);

PlayerTextDrawLetterSize(playerid, CharSelect[playerid][10], 0.219999, 0.699998);

PlayerTextDrawColor(playerid, CharSelect[playerid][10], -1);

PlayerTextDrawSetOutline(playerid, CharSelect[playerid][10], 0);

PlayerTextDrawSetProportional(playerid, CharSelect[playerid][10], 1);

PlayerTextDrawSetShadow(playerid, CharSelect[playerid][10], 0);

PlayerTextDrawUseBox(playerid, CharSelect[playerid][10], 1);

PlayerTextDrawBoxColor(playerid, CharSelect[playerid][10], 645404415);

PlayerTextDrawTextSize(playerid, CharSelect[playerid][10], 0.000000, 63.000000);

PlayerTextDrawSetSelectable(playerid, CharSelect[playerid][10], 1);





Code:
forward ShowCharacterMenu(playerid);

public ShowCharacterMenu(playerid)

{

SelectTextDraw(playerid, 0x00FF00FF);



PlayerTextDrawSetString(playerid, CharSelect[playerid][15], (!PlayerCharacters[playerid][0][0]) ? ("Empty Slot") : (PlayerCharacters[playerid][0]));

PlayerTextDrawSetPreviewModel(playerid, CharSelect[playerid][1], PlayerCharactersModel[playerid][0]);

PlayerTextDrawSetString(playerid, CharSelect[playerid][2], (!PlayerCharacters[playerid][1][0]) ? ("Empty Slot") : (PlayerCharacters[playerid][1]));

PlayerTextDrawSetPreviewModel(playerid, CharSelect[playerid][3], PlayerCharactersModel[playerid][1]);

PlayerTextDrawSetString(playerid, CharSelect[playerid][4], (!PlayerCharacters[playerid][2][0]) ? ("Empty Slot") : (PlayerCharacters[playerid][2]));

PlayerTextDrawSetPreviewModel(playerid, CharSelect[playerid][5], PlayerCharactersModel[playerid][2]);

PlayerTextDrawSetString(playerid, CharSelect[playerid][6], (!PlayerCharacters[playerid][3][0]) ? ("Empty Slot") : (PlayerCharacters[playerid][3]));

PlayerTextDrawSetPreviewModel(playerid, CharSelect[playerid][7], PlayerCharactersModel[playerid][3]);

PlayerTextDrawSetString(playerid, CharSelect[playerid][8], (!PlayerCharacters[playerid][4][0]) ? ("Empty Slot") : (PlayerCharacters[playerid][4]));

PlayerTextDrawSetPreviewModel(playerid, CharSelect[playerid][9], PlayerCharactersModel[playerid][4]);



for(new i; i < 16; i)

{

PlayerTextDrawShow(playerid, CharSelect[playerid][i]);

}

return 1;

}



RE: PlayerTextDrawSetSelectable [SOLVED] - Torque - 2021-02-07

TextSize was set to 0.000000.