SA-MP Forums Archive
Textdraw Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Textdraw Problem (/showthread.php?tid=574407)



[Resolved] Textdraw Problem - MattyG - 16.05.2015

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.


Re: Textdraw Problem - Boyka96 - 16.05.2015

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


Re: Textdraw Problem - MattyG - 17.05.2015

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.


Re: Textdraw Problem - Virtual1ty - 17.05.2015

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!


Re: Textdraw Problem - Vitos - 17.05.2015

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