16.01.2013, 12:36
Hello, I need help with some textdraws I made. The problem is that a textdraw always appear under another one, but I wanted it above. The textdraws are the phonescreen[playerid] (the one I want above) and phoneback[playerid](the one I want under).
On the TextDrawShowForPlayer I already tried to put the screen under and above the back, though it always apear under the other.
Here's the codes:
Hope someone can help me
On the TextDrawShowForPlayer I already tried to put the screen under and above the back, though it always apear under the other.
Here's the codes:
pawn Код:
// create textdraw
phonescreen[playerid] = TextDrawCreate(376.348419, 109.999984, "test");
TextDrawLetterSize(phonescreen[playerid], 0.000000, 13.893341);
TextDrawTextSize(phonescreen[playerid], 245.379119, 0.000000);
TextDrawAlignment(phonescreen[playerid], 1);
TextDrawColor(phonescreen[playerid], -1);
TextDrawUseBox(phonescreen[playerid], true);
TextDrawBoxColor(phonescreen[playerid], -1);
TextDrawSetShadow(phonescreen[playerid], 0);
TextDrawSetOutline(phonescreen[playerid], 0);
TextDrawBackgroundColor(phonescreen[playerid], -1);
TextDrawFont(phonescreen[playerid], 0);
phoneback[playerid] = TextDrawCreate(234.040161, 100.666709, "usebox");
TextDrawLetterSize(phoneback[playerid], 0.000000, 37.341136);
TextDrawTextSize(phoneback[playerid], 386.404266, 0.000000);
TextDrawAlignment(phoneback[playerid], 1);
TextDrawColor(phoneback[playerid], -1);
TextDrawUseBox(phoneback[playerid], true);
TextDrawBoxColor(phoneback[playerid], 0xFF8080FF);
TextDrawSetShadow(phoneback[playerid], 0);
TextDrawSetOutline(phoneback[playerid], 0);
TextDrawFont(phoneback[playerid], 0);
phonen1[playerid] = TextDrawCreate(260, 250, "1");
TextDrawLetterSize(phonen1[playerid], 2, 3);
TextDrawSetShadow(phonen1[playerid], 0);
TextDrawSetOutline(phonen1[playerid], 2);
TextDrawSetSelectable(phonen1[playerid], 1);
TextDrawUseBox(phonen1[playerid], 1);
TextDrawAlignment(phonen1[playerid], 2);
TextDrawBoxColor(phonen1[playerid], 0x00000000);
TextDrawTextSize(phonen1[playerid], 25, 25);
phonen2[playerid] = TextDrawCreate(310, 250, "2");
TextDrawLetterSize(phonen2[playerid], 2, 3);
TextDrawSetShadow(phonen2[playerid], 0);
TextDrawSetOutline(phonen2[playerid], 2);
TextDrawSetSelectable(phonen2[playerid], 1);
TextDrawUseBox(phonen2[playerid], 1);
TextDrawAlignment(phonen2[playerid], 2);
TextDrawBoxColor(phonen2[playerid], 0x00000000);
TextDrawTextSize(phonen2[playerid], 25, 25);
phonen3[playerid] = TextDrawCreate(360, 250, "3");
TextDrawLetterSize(phonen3[playerid], 2, 3);
TextDrawSetShadow(phonen3[playerid], 0);
TextDrawSetOutline(phonen3[playerid], 2);
TextDrawSetSelectable(phonen3[playerid], 1);
TextDrawUseBox(phonen3[playerid], 1);
TextDrawAlignment(phonen3[playerid], 2);
TextDrawBoxColor(phonen3[playerid], 0x00000000);
TextDrawTextSize(phonen3[playerid], 25, 25);
phonen4[playerid] = TextDrawCreate(260, 300, "4");
TextDrawLetterSize(phonen4[playerid], 2, 3);
TextDrawSetShadow(phonen4[playerid], 0);
TextDrawSetOutline(phonen4[playerid], 2);
TextDrawSetSelectable(phonen4[playerid], 1);
TextDrawUseBox(phonen4[playerid], 1);
TextDrawAlignment(phonen4[playerid], 2);
TextDrawBoxColor(phonen4[playerid], 0x00000000);
TextDrawTextSize(phonen4[playerid], 25, 25);
phonen5[playerid] = TextDrawCreate(310, 300, "5");
TextDrawLetterSize(phonen5[playerid], 2, 3);
TextDrawSetShadow(phonen5[playerid], 0);
TextDrawSetOutline(phonen5[playerid], 2);
TextDrawSetSelectable(phonen5[playerid], 1);
TextDrawUseBox(phonen5[playerid], 1);
TextDrawAlignment(phonen5[playerid], 2);
TextDrawBoxColor(phonen5[playerid], 0x00000000);
TextDrawTextSize(phonen5[playerid], 25, 25);
phonen6[playerid] = TextDrawCreate(360, 300, "6");
TextDrawLetterSize(phonen6[playerid], 2, 3);
TextDrawSetShadow(phonen6[playerid], 0);
TextDrawSetOutline(phonen6[playerid], 2);
TextDrawSetSelectable(phonen6[playerid], 1);
TextDrawUseBox(phonen6[playerid], 1);
TextDrawAlignment(phonen6[playerid], 2);
TextDrawBoxColor(phonen6[playerid], 0x00000000);
TextDrawTextSize(phonen6[playerid], 25, 25);
phonen7[playerid] = TextDrawCreate(260, 350, "7");
TextDrawLetterSize(phonen7[playerid], 2, 3);
TextDrawSetShadow(phonen7[playerid], 0);
TextDrawSetOutline(phonen7[playerid], 2);
TextDrawSetSelectable(phonen7[playerid], 1);
TextDrawUseBox(phonen7[playerid], 1);
TextDrawAlignment(phonen7[playerid], 2);
TextDrawBoxColor(phonen7[playerid], 0x00000000);
TextDrawTextSize(phonen7[playerid], 25, 25);
phonen8[playerid] = TextDrawCreate(310, 350, "8");
TextDrawLetterSize(phonen8[playerid], 2, 3);
TextDrawSetShadow(phonen8[playerid], 0);
TextDrawSetOutline(phonen8[playerid], 2);
TextDrawSetSelectable(phonen8[playerid], 1);
TextDrawUseBox(phonen8[playerid], 1);
TextDrawAlignment(phonen8[playerid], 2);
TextDrawBoxColor(phonen8[playerid], 0x00000000);
TextDrawTextSize(phonen8[playerid], 25, 25);
phonen9[playerid] = TextDrawCreate(360, 350, "9");
TextDrawLetterSize(phonen9[playerid], 2, 3);
TextDrawSetShadow(phonen9[playerid], 0);
TextDrawSetOutline(phonen9[playerid], 2);
TextDrawSetSelectable(phonen9[playerid], 1);
TextDrawUseBox(phonen9[playerid], 1);
TextDrawAlignment(phonen9[playerid], 2);
TextDrawBoxColor(phonen9[playerid], 0x00000000);
TextDrawTextSize(phonen9[playerid], 25, 25);
phonens[playerid] = TextDrawCreate(260, 400, "+");
TextDrawLetterSize(phonens[playerid], 2, 3);
TextDrawSetShadow(phonens[playerid], 0);
TextDrawSetOutline(phonens[playerid], 2);
TextDrawSetSelectable(phonens[playerid], 1);
TextDrawUseBox(phonens[playerid], 1);
TextDrawAlignment(phonens[playerid], 2);
TextDrawBoxColor(phonens[playerid], 0x00000000);
TextDrawTextSize(phonens[playerid], 25, 25);
phonen0[playerid] = TextDrawCreate(310, 400, "0");
TextDrawLetterSize(phonen0[playerid], 2, 3);
TextDrawSetShadow(phonen0[playerid], 0);
TextDrawSetOutline(phonen0[playerid], 2);
TextDrawSetSelectable(phonen0[playerid], 1);
TextDrawUseBox(phonen0[playerid], 1);
TextDrawAlignment(phonen0[playerid], 2);
TextDrawBoxColor(phonen0[playerid], 0x00000000);
TextDrawTextSize(phonen0[playerid], 25, 25);
phonenc[playerid] = TextDrawCreate(360, 400, "#");
TextDrawLetterSize(phonenc[playerid], 2, 3);
TextDrawSetShadow(phonenc[playerid], 0);
TextDrawSetOutline(phonenc[playerid], 2);
TextDrawSetSelectable(phonenc[playerid], 1);
TextDrawUseBox(phonenc[playerid], 1);
TextDrawAlignment(phonenc[playerid], 2);
TextDrawBoxColor(phonenc[playerid], 0x00000000);
TextDrawTextSize(phonenc[playerid], 25, 25);
pawn Код:
//show TD
CMD:takephone(playerid, params[])
{
SelectTextDraw(playerid, c_speedo);
TextDrawShowForPlayer(playerid, phoneback[playerid]);
TextDrawShowForPlayer(playerid, phonescreen[playerid]);
TextDrawShowForPlayer(playerid, phonen1[playerid]);
TextDrawShowForPlayer(playerid, phonen2[playerid]);
TextDrawShowForPlayer(playerid, phonen3[playerid]);
TextDrawShowForPlayer(playerid, phonen4[playerid]);
TextDrawShowForPlayer(playerid, phonen5[playerid]);
TextDrawShowForPlayer(playerid, phonen6[playerid]);
TextDrawShowForPlayer(playerid, phonen7[playerid]);
TextDrawShowForPlayer(playerid, phonen8[playerid]);
TextDrawShowForPlayer(playerid, phonen9[playerid]);
TextDrawShowForPlayer(playerid, phonens[playerid]);
TextDrawShowForPlayer(playerid, phonen0[playerid]);
TextDrawShowForPlayer(playerid, phonenc[playerid]);
return 1;
}