09.07.2016, 15:52
These are the textdraws:
I called the SelectTextDraw in OnPlayerKeyStatechange.
The public
It shows the cursor but I cannot click the textdraw. It does nothing and when I hover the textdraw it doesn't even change its color. Help please.
pawn Код:
Textdraw0 = TextDrawCreate(79.666786, 161.203704, "usebox");
TextDrawLetterSize(Textdraw0, 0.000000, 1.182924);
TextDrawTextSize(Textdraw0, 61.776664, 20.000000);
TextDrawAlignment(Textdraw0, 1);
TextDrawColor(Textdraw0, 65535);
TextDrawUseBox(Textdraw0, true);
TextDrawBoxColor(Textdraw0, 65535);
TextDrawSetProportional(Textdraw0,1);
TextDrawSetShadow(Textdraw0, 1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawBackgroundColor(Textdraw0, -1523963137);
TextDrawFont(Textdraw0, 0);
TextDrawSetSelectable(Textdraw0, 1);
Textdraw1 = TextDrawCreate(264.000061, 196.877777, "usebox");
TextDrawLetterSize(Textdraw1, 0.000000, 1.456995);
TextDrawTextSize(Textdraw1, 248.000000, 20.000000);
TextDrawAlignment(Textdraw1, 1);
TextDrawColor(Textdraw1, 0);
TextDrawUseBox(Textdraw1, true);
TextDrawBoxColor(Textdraw1, 65535);
TextDrawSetProportional(Textdraw1,1);
TextDrawSetShadow(Textdraw1, 1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawFont(Textdraw1, 0);
TextDrawSetSelectable(Textdraw1, 1);
Textdraw2 = TextDrawCreate(506.666687, 210.151855, "usebox");
TextDrawLetterSize(Textdraw2, 0.000000, 3.001852);
TextDrawTextSize(Textdraw2, 473.000000, 20.000000);
TextDrawAlignment(Textdraw2, 1);
TextDrawColor(Textdraw2, 0);
TextDrawUseBox(Textdraw2, true);
TextDrawBoxColor(Textdraw2, 65535);
TextDrawSetProportional(Textdraw2,1);
TextDrawSetShadow(Textdraw2, 1);
TextDrawSetOutline(Textdraw2, 0);
TextDrawFont(Textdraw2, 0);
TextDrawSetSelectable(Textdraw2, 1);
Textdraw3 = TextDrawCreate(103.666671, 300.166687, "usebox");
TextDrawLetterSize(Textdraw3, 0.000000, 3.508846);
TextDrawTextSize(Textdraw3, 63.666664, 20.000000);
TextDrawAlignment(Textdraw3, 1);
TextDrawColor(Textdraw3, 0);
TextDrawUseBox(Textdraw3, true);
TextDrawBoxColor(Textdraw3, 65535);
TextDrawSetProportional(Textdraw3,1);
TextDrawSetShadow(Textdraw3, 1);
TextDrawSetOutline(Textdraw3, 0);
TextDrawFont(Textdraw3, 0);
TextDrawSetSelectable(Textdraw3, 1);
Textdraw4 = TextDrawCreate(490.333312, 48.374073, "usebox");
TextDrawLetterSize(Textdraw4, 0.000000, 3.647119);
TextDrawTextSize(Textdraw4, 445.333343, 20.000000);
TextDrawAlignment(Textdraw4, 1);
TextDrawColor(Textdraw4, 0);
TextDrawUseBox(Textdraw4, true);
TextDrawBoxColor(Textdraw4, 65535);
TextDrawSetProportional(Textdraw4,1);
TextDrawSetShadow(Textdraw4, 1);
TextDrawSetOutline(Textdraw4, 0);
TextDrawFont(Textdraw4, 0);
TextDrawSetSelectable(Textdraw4, 1);
Textdraw5 = TextDrawCreate(489.000000, 364.462951, "usebox");
TextDrawLetterSize(Textdraw5, 0.000000, 3.140123);
TextDrawTextSize(Textdraw5, 454.666687, 20.000000);
TextDrawAlignment(Textdraw5, 1);
TextDrawColor(Textdraw5, 0);
TextDrawUseBox(Textdraw5, true);
TextDrawBoxColor(Textdraw5, 65535);
TextDrawSetProportional(Textdraw5,1);
TextDrawSetShadow(Textdraw5, 1);
TextDrawSetOutline(Textdraw5, 0);
TextDrawFont(Textdraw5, 0);
TextDrawSetSelectable(Textdraw5, 1);
The public
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == Textdraw0 || clickedid == Textdraw1 || clickedid == Textdraw2 || clickedid == Textdraw3 || clickedid == Textdraw4 || clickedid == Textdraw5)
{
KillTimer(hotwire_timer[playerid]);
KillTextdraws(playerid);
ShowRandomTextdraw(playerid);
clicked[playerid]++;
hotwire_timer[playerid] = SetTimer("Hotwire", HOTWIRE_TIME, true);
printf("success = %d", clicked[playerid]);
}
return 1;
}