[HELP]: How much Textdraws !
#1

Hello SA-MP !

I would like to know, How much textdraws can i show at the same time ?

Thanks
Reply
#2

I think that they are unlimited.
Edit: but I don't suggest you to make them 100+, because I used this tool which converted a image to textdraws, they were like 2000 + and they were loading slowly.
Reply
#3

Limits: https://sampwiki.blast.hk/wiki/Limits

You can use 20 textdraw at the same time aslong it doesn't fuck up the whole screen.
Reply
#4

Well, then I have a weird problem... If I use 4 Normal Textdraws and 1 Player Textdraw, Then i see only Player Textdraw and 1 Normal Textdraw :/

EDIT: I have like this:

pawn Код:
PlayerTextDrawShow(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4);
TextDrawShowForPlayer(playerid, Textdraw5);
But it only shows PlayerTextDraw and Texdraw id 5 :/
Reply
#5

Quote:
Originally Posted by Areax
Посмотреть сообщение
Well, then I have a weird problem... If I use 4 Normal Textdraws and 1 Player Textdraw, Then i see only Player Textdraw and 1 Normal Textdraw :/
Could you show us the code ?
Reply
#6

At the top:
pawn Код:
new PlayerText:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
new Text:Textdraw5;
OnGameModeInit:
pawn Код:
Textdraw2 = TextDrawCreate(313.000000, 210.000000, "Terrorist");
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 3);
TextDrawLetterSize(Textdraw2, 0.500000, 1.000000);
TextDrawColor(Textdraw2, -16776961);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 1);
TextDrawUseBox(Textdraw2, 1);
TextDrawBoxColor(Textdraw2, -1);
TextDrawTextSize(Textdraw2, 401.000000, 0.000000);
TextDrawSetSelectable(Textdraw2, 1);

Textdraw3 = TextDrawCreate(240.000000, 210.000000, "Police");
TextDrawBackgroundColor(Textdraw3, 255);
TextDrawFont(Textdraw3, 3);
TextDrawLetterSize(Textdraw3, 0.500000, 1.000000);
TextDrawColor(Textdraw3, 65535);
TextDrawSetOutline(Textdraw3, 1);
TextDrawSetProportional(Textdraw3, 1);
TextDrawUseBox(Textdraw3, 1);
TextDrawBoxColor(Textdraw3, -1);
TextDrawTextSize(Textdraw3, 293.000000, 0.000000);
TextDrawSetSelectable(Textdraw3, 1);

Textdraw4 = TextDrawCreate(241.000000, 159.000000, "Pick up the team, you want to be in");
TextDrawBackgroundColor(Textdraw4, 255);
TextDrawFont(Textdraw4, 1);
TextDrawLetterSize(Textdraw4, 0.500000, 2.000000);
TextDrawColor(Textdraw4, -65281);
TextDrawSetOutline(Textdraw4, 1);
TextDrawSetProportional(Textdraw4, 1);
TextDrawUseBox(Textdraw4, 1);
TextDrawBoxColor(Textdraw4, -1);
TextDrawTextSize(Textdraw4, 401.000000, 221.000000);
TextDrawSetSelectable(Textdraw4, 0);

Textdraw5 = TextDrawCreate(240.000000, 140.000000, "Selecting Teams :");
TextDrawBackgroundColor(Textdraw5, 255);
TextDrawFont(Textdraw5, 2);
TextDrawLetterSize(Textdraw5, 0.300000, 1.000000);
TextDrawColor(Textdraw5, 16711935);
TextDrawSetOutline(Textdraw5, 1);
TextDrawSetProportional(Textdraw5, 1);
TextDrawUseBox(Textdraw5, 1);
TextDrawBoxColor(Textdraw5, -1);
TextDrawTextSize(Textdraw5, 400.000000, 0.000000);
TextDrawSetSelectable(Textdraw5, 0);
OnPlayerConnect:
pawn Код:
Textdraw1 = CreatePlayerTextDraw(playerid,230.000000, 130.000000, " ");
    PlayerTextDrawBackgroundColor(playerid,Textdraw1, 255);
    PlayerTextDrawFont(playerid,Textdraw1, 5);
    PlayerTextDrawLetterSize(playerid,Textdraw1, 0.500000, 1.000000);
    PlayerTextDrawColor(playerid,Textdraw1, -1);
    PlayerTextDrawSetOutline(playerid,Textdraw1, 0);
    PlayerTextDrawSetProportional(playerid,Textdraw1, 1);
    PlayerTextDrawSetShadow(playerid,Textdraw1, 1);
    PlayerTextDrawUseBox(playerid,Textdraw1, 1);
    PlayerTextDrawBoxColor(playerid,Textdraw1, 255);
    PlayerTextDrawTextSize(playerid,Textdraw1, 182.000000, 99.000000);
    PlayerTextDrawSetPreviewModel(playerid, Textdraw1, 2);
    PlayerTextDrawSetPreviewRot(playerid, Textdraw1, -16.000000, 0.000000, -55.000000, -5.000000);
    PlayerTextDrawSetSelectable(playerid,Textdraw1, 0);
OnDialogResponse
pawn Код:
PlayerTextDrawShow(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4);
TextDrawShowForPlayer(playerid, Textdraw5);
Reply
#7

That is because playertextdraws are created AFTER normal textures usually therefore they overlap. You are using playertextdraws incorrectly they should almost never have a visible box and are typically meant for overlaying. Make sure everything possible is in your normal textdraws only text and sometimes textures would be used.
Reply
#8

Replied above.
Reply
#9

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
That is because playertextdraws are created AFTER normal textures usually therefore they overlap. You are using playertextdraws incorrectly they should almost never have a visible box and are typically meant for overlaying. Make sure everything possible is in your normal textdraws only text and sometimes textures would be used.
It's created BEFORE, check Textdraw's id. Player textdraw is id 1 and then other textdraws.

EDIT: Then how can I create just a box ? Without a text ? BTW: I am using textdraw editor.
Reply
#10

Try this editor. It's easy to use. And check the way it creates boxes after that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)