Textdraw Problem
#1

I haven't scripted in a while, so bear with me. Okay, so I have a major problem with my textdraws. I'm trying to create blank boxes with them, but my boxes do not work. Here is some code:

pawn Код:
//Top of script:
new Text:gDuelingTextDraws[11];

//OnGameModeInit:
gDuelingTextDraws[0] = TextDrawCreate(150, 70, " ");
TextDrawUseBox(gDuelingTextDraws[0], 1);
TextDrawSetProportional(gDuelingTextDraws[0], 0);
TextDrawBoxColor(gDuelingTextDraws[0], CHAT_PRIMARY);
TextDrawTextSize(gDuelingTextDraws[0], 340.0, 340.0);

gDuelingTextDraws[1] = TextDrawCreate(147, 67, " ");
TextDrawUseBox(gDuelingTextDraws[1], 1);
TextDrawSetProportional(gDuelingTextDraws[1], 0);
TextDrawBoxColor(gDuelingTextDraws[1], CHAT_BLACK);
TextDrawTextSize(gDuelingTextDraws[1], 346.0, 346.0);

//In my command:
TextDrawShowForPlayer(playerid, gDuelingTextDraws[0]);
TextDrawShowForPlayer(playerid, gDuelingTextDraws[1]);
However, this is how it shows up: click here (Yes, it's those lines in the top of the screen)

All of the co-ordinates entered are correct, I just don't understand why it doesn't work. Any help is massively appreciated.
Reply
#2

The best way to create textdraws is by using a textdraws editor : you can create your textdraw from scratch in a short time and it's the best way to avoid such problems .. here is one of the best ones aroud
https://sampforum.blast.hk/showthread.php?tid=543002
Reply
#3

Okay, I tried using the textdraw editor, but I still had the same problem, my box didn't have the right height. It seems I need to just place new lines in it, to expand the height. Thanks for the help though.
Reply
#4

If you want to adjust the box Y-size use (Player)TextDrawLetterSize or use the gametext newline as you said.
Please check the wiki pages for any function documentation because it's just great!
Reply
#5

I recommend you to use iPLEOMAX textdraw editor way easier - https://sampforum.blast.hk/showthread.php?tid=376758
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)