SA-MP Forums Archive
[HELP]: How much Textdraws ! - 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: [HELP]: How much Textdraws ! (/showthread.php?tid=471020)



[HELP]: How much Textdraws ! - Areax - 20.10.2013

Hello SA-MP !

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

Thanks


Re: [HELP]: How much Textdraws ! - Wizzy951 - 20.10.2013

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.


Re: [HELP]: How much Textdraws ! - Patrick - 20.10.2013

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.


Re: [HELP]: How much Textdraws ! - Areax - 20.10.2013

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 :/


Re: [HELP]: How much Textdraws ! - Wizzy951 - 20.10.2013

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 ?


Re: [HELP]: How much Textdraws ! - Areax - 20.10.2013

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);



Re: [HELP]: How much Textdraws ! - Pottus - 20.10.2013

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.


Re: [HELP]: How much Textdraws ! - iZN - 20.10.2013

Replied above.


Re: [HELP]: How much Textdraws ! - Areax - 20.10.2013

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.


Re: [HELP]: How much Textdraws ! - Wizzy951 - 20.10.2013

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