Texture Selection Problem
#1

When I click on Texture1, I will notice that the text it's made of Texture2 is not Texture1. How should I fix it?

This is example.

Quote:

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
new string[128],
headers[128],
name[MAX_PLAYER_NAME];

GetPlayerName(playerid, name, sizeof(name));

if(Text:INVALID_TEXT_DRAW == clickedid)
{
if(!CloseTextDraw[playerid]) SelectTextDraw(playerid, 0x00FF00FF);
}

if(clickedid == Textdraw1)
{
SendClientMessage(playerid, -1, "B");
}
else if(clickedid == Textdraw2)
{
SendClientMessage(playerid, -1, "A");
}
return 1;
}

I choose Textdraw1, but the text is up to Textdraw2. That's it. The word A is not the same as the word B, even if I click anywhere on the screen.

This is the code for both Textdraw.

Quote:

Textdraw2 = TextDrawCreate(570.000000, 9.333334, "TEXTDRAW2");
TextDrawLetterSize(Textdraw2, 0.449999, 1.600000);
TextDrawAlignment(Textdraw2, 1);
TextDrawColor(Textdraw2, -1);
TextDrawSetShadow(Textdraw2, 0);
TextDrawSetOutline(Textdraw2, 1);
TextDrawBackgroundColor(Textdraw2, 51);
TextDrawFont(Textdraw2, 2);
TextDrawSetProportional(Textdraw2, 1);
TextDrawSetSelectable(Textdraw2, true);

Textdraw3 = TextDrawCreate(424.250000, 9.187500, "TEXTDRAW3");
TextDrawLetterSize(Textdraw3, 0.449999, 1.600000);
TextDrawAlignment(Textdraw3, 1);
TextDrawColor(Textdraw3, -1);
TextDrawSetShadow(Textdraw3, 0);
TextDrawSetOutline(Textdraw3, 1);
TextDrawBackgroundColor(Textdraw3, 51);
TextDrawFont(Textdraw3, 2);
TextDrawSetProportional(Textdraw3, 1);
TextDrawSetSelectable(Textdraw3, true);

How should I fix it?
Reply
#2

Same problem with video.

https://www.youtube.com/watch?v=SugJDSOR6q0
Reply
#3

Help me pls.
Reply
#4

https://sampwiki.blast.hk/wiki/TextDrawTextSize
Reply
#5

Quote:

Textdraw2 = TextDrawCreate(570.000000, 9.333333, "Textdraw2");
TextDrawLetterSize(Textdraw2, 0.449999, 1.600000);
TextDrawTextSize(Textdraw2, 269.375000, 102.083351);
TextDrawAlignment(Textdraw2, 1);
TextDrawColor(Textdraw2, -1);
TextDrawSetShadow(Textdraw2, 0);
TextDrawSetOutline(Textdraw2, 1);
TextDrawBackgroundColor(Textdraw2, 51);
TextDrawFont(Textdraw2, 2);
TextDrawSetProportional(Textdraw2, 1);
TextDrawSetSelectable(Textdraw2, true);

Textdraw3 = TextDrawCreate(424.250000, 9.187500, "Textdraw3");
TextDrawLetterSize(Textdraw3, 0.449999, 1.600000);
TextDrawTextSize(Textdraw3, 119.375000, 34.416667);
TextDrawAlignment(Textdraw3, 1);
TextDrawColor(Textdraw3, -1);
TextDrawSetShadow(Textdraw3, 0);
TextDrawSetOutline(Textdraw3, 1);
TextDrawBackgroundColor(Textdraw3, 51);
TextDrawFont(Textdraw3, 2);
TextDrawSetProportional(Textdraw3, 1);
TextDrawSetSelectable(Textdraw3, true);

Yes, I try add TextDrawTextSize in IPleomax's Textdraw Editor but i run server and connect to server i can't click anything textdraw?
Reply
#6

The problem isn't in those textdraws, The problem is a SA-MP textdraw bug,
Those normal textdraws like Text , normal Boxes, Wont be good for clicking it, They'll conflict for sure, The fix is this !
Create a new Textdraw, and don't make Box textdraws there, Use Model or Sprite Textdraw instead,
So that it wont conflict, and make only Model or Sprite Textdraws, Clickable, not the text,
Make Model or Sprite textdraw colored, so that you can't see anything there instead of a color,

Would be a simple fix ! But you've to re-create,
That's how the Clickable works here !
Reply
#7

You mean, I can not create a textdraw inside a box?
Reply
#8

Clickable textdraws are buggy with Box Textdraw,
You don't need to create a box textdraw, Use Sprite or Model Textdraw instead, and for Text , create a New normal textdraw,
Or if you are too lazy,
Then just create a Sprite/Model textdraw and Re-size it same as the size of the box textdraw ( those that were conflicting ) , and make that Sprite/Model textdraw clickable, And don't set the box textdraw clickable then, Only use Sprite/Model textdraw for clickable things !
As normal/box textdraws Conflicts !
Reply
#9

Quote:
Originally Posted by FuNkYTheGreat
Посмотреть сообщение
Clickable textdraws are buggy with Box Textdraw,
You don't need to create a box textdraw, Use Sprite or Model Textdraw instead, and for Text , create a New normal textdraw,
Or if you are too lazy,
Then just create a Sprite/Model textdraw and Re-size it same as the size of the box textdraw ( those that were conflicting ) , and make that Sprite/Model textdraw clickable, And don't set the box textdraw clickable then, Only use Sprite/Model textdraw for clickable things !
As normal/box textdraws Conflicts !
No. You're wrong
Reply
#10

Quote:
Originally Posted by Meller
Посмотреть сообщение
No. You're wrong
How to fix that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)