Textdraw's conflicting with each other..
#1

i made 4-5 textdraws and are selectable but they the problem is that if i select one the one near it also gets selected and the command contained in the other textdraw also gets executed. it also happens with 2 textdraws. Any way to fix this conflicting?
Reply
#2

Decrease Textdraw size
Reply
#3

Already on small size. Im using boxes too and they are also of small size
Reply
#4

How small is it? Provide us a SS.
Reply
#5

Reply
#6

There should not be any problems with these.

If there is so set the text selectable only.
Reply
#7

I only made the text selectable. Not the boxes
Reply
#8

Hello.

Can you show us your code of these textdraws, please?
Reply
#9

Did you use TextDrawTextSize at all? You need to use that to define a clickable area.

Quote:
Originally Posted by SA-MP Wiki
TextDrawSetSelectable or PlayerTextDrawSetSelectable MUST be used first, to allow a textdraw to be selectable.
Quote:
Originally Posted by SA-MP Wiki
It is the TEXT which will be highlighted when hovered over, NOT the box (if one is shown).
Quote:
Originally Posted by SA-MP Wiki
Use (Player)TextDrawTextSize to define the clickable area.
And yes, code would be appreciated if you really want this issue resolved.
Reply
#10

PHP код:
//Player Textdraws:

new PlayerText:Textdraw0[MAX_PLAYERS];
new 
PlayerText:Textdraw1[MAX_PLAYERS];
new 
PlayerText:Textdraw2[MAX_PLAYERS];
new 
PlayerText:Textdraw3[MAX_PLAYERS];
new 
PlayerText:Textdraw4[MAX_PLAYERS];
new 
PlayerText:Textdraw5[MAX_PLAYERS];
new 
PlayerText:Textdraw6[MAX_PLAYERS];
new 
PlayerText:Textdraw7[MAX_PLAYERS];
new 
PlayerText:Textdraw8[MAX_PLAYERS];
new 
PlayerText:Textdraw9[MAX_PLAYERS];
new 
PlayerText:Textdraw10[MAX_PLAYERS];
new 
PlayerText:Textdraw11[MAX_PLAYERS];


Textdraw0[playerid] = CreatePlayerTextDraw(playerid371.0000005.000030"usebox");
PlayerTextDrawLetterSize(playeridTextdraw0[playerid], 0.0000007.525925);
PlayerTextDrawTextSize(playeridTextdraw0[playerid], 261.5000000.000000);
PlayerTextDrawAlignment(playeridTextdraw0[playerid], 1);
PlayerTextDrawColor(playeridTextdraw0[playerid], 0);
PlayerTextDrawUseBox(playeridTextdraw0[playerid], true);
PlayerTextDrawBoxColor(playeridTextdraw0[playerid], 102);
PlayerTextDrawSetShadow(playeridTextdraw0[playerid], 0);
PlayerTextDrawSetOutline(playeridTextdraw0[playerid], 0);
PlayerTextDrawFont(playeridTextdraw0[playerid], 0);

Textdraw1[playerid] = CreatePlayerTextDraw(playerid371.50000080.249893"usebox");
PlayerTextDrawLetterSize(playeridTextdraw1[playerid], 0.0000007.525925);
PlayerTextDrawTextSize(playeridTextdraw1[playerid], 261.5000000.000000);
PlayerTextDrawAlignment(playeridTextdraw1[playerid], 1);
PlayerTextDrawColor(playeridTextdraw1[playerid], 0);
PlayerTextDrawUseBox(playeridTextdraw1[playerid], true);
PlayerTextDrawBoxColor(playeridTextdraw1[playerid], 102);
PlayerTextDrawSetShadow(playeridTextdraw1[playerid], 0);
PlayerTextDrawSetOutline(playeridTextdraw1[playerid], 0);
PlayerTextDrawFont(playeridTextdraw1[playerid], 0);

Textdraw2[playerid] = CreatePlayerTextDraw(playerid371.000000154.916748"usebox");
PlayerTextDrawLetterSize(playeridTextdraw2[playerid], 0.0000007.461111);
PlayerTextDrawTextSize(playeridTextdraw2[playerid], 262.0000000.000000);
PlayerTextDrawAlignment(playeridTextdraw2[playerid], 1);
PlayerTextDrawColor(playeridTextdraw2[playerid], 0);
PlayerTextDrawUseBox(playeridTextdraw2[playerid], true);
PlayerTextDrawBoxColor(playeridTextdraw2[playerid], 102);
PlayerTextDrawSetShadow(playeridTextdraw2[playerid], 0);
PlayerTextDrawSetOutline(playeridTextdraw2[playerid], 0);
PlayerTextDrawFont(playeridTextdraw2[playerid], 0);

Textdraw3[playerid] = CreatePlayerTextDraw(playerid371.500000229.583297"usebox");
PlayerTextDrawLetterSize(playeridTextdraw3[playerid], 0.0000007.461111);
PlayerTextDrawTextSize(playeridTextdraw3[playerid], 262.5000000.000000);
PlayerTextDrawAlignment(playeridTextdraw3[playerid], 1);
PlayerTextDrawColor(playeridTextdraw3[playerid], 0);
PlayerTextDrawUseBox(playeridTextdraw3[playerid], true);
PlayerTextDrawBoxColor(playeridTextdraw3[playerid], 102);
PlayerTextDrawSetShadow(playeridTextdraw3[playerid], 0);
PlayerTextDrawSetOutline(playeridTextdraw3[playerid], 0);
PlayerTextDrawFont(playeridTextdraw3[playerid], 1);

Textdraw4[playerid] = CreatePlayerTextDraw(playerid372.500000303.083374"usebox");
PlayerTextDrawLetterSize(playeridTextdraw4[playerid], 0.0000007.461111);
PlayerTextDrawTextSize(playeridTextdraw4[playerid], 263.0000000.000000);
PlayerTextDrawAlignment(playeridTextdraw4[playerid], 1);
PlayerTextDrawColor(playeridTextdraw4[playerid], 0);
PlayerTextDrawUseBox(playeridTextdraw4[playerid], true);
PlayerTextDrawBoxColor(playeridTextdraw4[playerid], 102);
PlayerTextDrawSetShadow(playeridTextdraw4[playerid], 0);
PlayerTextDrawSetOutline(playeridTextdraw4[playerid], 0);
PlayerTextDrawFont(playeridTextdraw4[playerid], 0);

Textdraw5[playerid] = CreatePlayerTextDraw(playerid298.00000027.999988"Cops");
PlayerTextDrawLetterSize(playeridTextdraw5[playerid], 0.4499991.600000);
PlayerTextDrawAlignment(playeridTextdraw5[playerid], 1);
PlayerTextDrawColor(playeridTextdraw5[playerid], -1);
PlayerTextDrawSetShadow(playeridTextdraw5[playerid], 0);
PlayerTextDrawSetOutline(playeridTextdraw5[playerid], 1);
PlayerTextDrawBackgroundColor(playeridTextdraw5[playerid], 51);
PlayerTextDrawFont(playeridTextdraw5[playerid], 3);
PlayerTextDrawSetProportional(playeridTextdraw5[playerid], 1);
PlayerTextDrawSetSelectable(playeridTextdraw5[playerid], true);

Textdraw6[playerid] = CreatePlayerTextDraw(playerid284.000000105.583320"Robbers");
PlayerTextDrawLetterSize(playeridTextdraw6[playerid], 0.4499991.600000);
PlayerTextDrawAlignment(playeridTextdraw6[playerid], 1);
PlayerTextDrawColor(playeridTextdraw6[playerid], -1);
PlayerTextDrawSetShadow(playeridTextdraw6[playerid], 0);
PlayerTextDrawSetOutline(playeridTextdraw6[playerid], 1);
PlayerTextDrawBackgroundColor(playeridTextdraw6[playerid], 51);
PlayerTextDrawFont(playeridTextdraw6[playerid], 3);
PlayerTextDrawSetProportional(playeridTextdraw6[playerid], 1);
PlayerTextDrawSetSelectable(playeridTextdraw6[playerid], true);

Textdraw7[playerid] = CreatePlayerTextDraw(playerid276.500000181.416641"Terrorist");
PlayerTextDrawLetterSize(playeridTextdraw7[playerid], 0.4499991.600000);
PlayerTextDrawAlignment(playeridTextdraw7[playerid], 1);
PlayerTextDrawColor(playeridTextdraw7[playerid], -1);
PlayerTextDrawSetShadow(playeridTextdraw7[playerid], 0);
PlayerTextDrawSetOutline(playeridTextdraw7[playerid], 1);
PlayerTextDrawBackgroundColor(playeridTextdraw7[playerid], 51);
PlayerTextDrawFont(playeridTextdraw7[playerid], 3);
PlayerTextDrawSetProportional(playeridTextdraw7[playerid], 1);
PlayerTextDrawSetSelectable(playeridTextdraw7[playerid], true);

Textdraw8[playerid] = CreatePlayerTextDraw(playerid296.000000250.833358"Swat");
PlayerTextDrawLetterSize(playeridTextdraw8[playerid], 0.4499991.600000);
PlayerTextDrawAlignment(playeridTextdraw8[playerid], 1);
PlayerTextDrawColor(playeridTextdraw8[playerid], -1);
PlayerTextDrawSetShadow(playeridTextdraw8[playerid], 0);
PlayerTextDrawSetOutline(playeridTextdraw8[playerid], 1);
PlayerTextDrawBackgroundColor(playeridTextdraw8[playerid], 51);
PlayerTextDrawFont(playeridTextdraw8[playerid], 3);
PlayerTextDrawSetProportional(playeridTextdraw8[playerid], 1);
PlayerTextDrawSetSelectable(playeridTextdraw8[playerid], true);

Textdraw9[playerid] = CreatePlayerTextDraw(playerid296.000000327.833221"Army");
PlayerTextDrawLetterSize(playeridTextdraw9[playerid], 0.4499991.600000);
PlayerTextDrawAlignment(playeridTextdraw9[playerid], 1);
PlayerTextDrawColor(playeridTextdraw9[playerid], -1);
PlayerTextDrawSetShadow(playeridTextdraw9[playerid], 0);
PlayerTextDrawSetOutline(playeridTextdraw9[playerid], 1);
PlayerTextDrawBackgroundColor(playeridTextdraw9[playerid], 51);
PlayerTextDrawFont(playeridTextdraw9[playerid], 3);
PlayerTextDrawSetProportional(playeridTextdraw9[playerid], 1);
PlayerTextDrawSetSelectable(playeridTextdraw9[playerid], true);

Textdraw10[playerid] = CreatePlayerTextDraw(playerid372.500000376.583282"usebox");
PlayerTextDrawLetterSize(playeridTextdraw10[playerid], 0.0000007.331479);
PlayerTextDrawTextSize(playeridTextdraw10[playerid], 264.5000000.000000);
PlayerTextDrawAlignment(playeridTextdraw10[playerid], 1);
PlayerTextDrawColor(playeridTextdraw10[playerid], 0);
PlayerTextDrawUseBox(playeridTextdraw10[playerid], true);
PlayerTextDrawBoxColor(playeridTextdraw10[playerid], 102);
PlayerTextDrawSetShadow(playeridTextdraw10[playerid], 0);
PlayerTextDrawSetOutline(playeridTextdraw10[playerid], 0);
PlayerTextDrawFont(playeridTextdraw10[playerid], 0);

Textdraw11[playerid] = CreatePlayerTextDraw(playerid308.500000401.333343"FBI");
PlayerTextDrawLetterSize(playeridTextdraw11[playerid], 0.4499991.600000);
PlayerTextDrawAlignment(playeridTextdraw11[playerid], 1);
PlayerTextDrawColor(playeridTextdraw11[playerid], -1);
PlayerTextDrawSetShadow(playeridTextdraw11[playerid], 0);
PlayerTextDrawSetOutline(playeridTextdraw11[playerid], 1);
PlayerTextDrawBackgroundColor(playeridTextdraw11[playerid], 51);
PlayerTextDrawFont(playeridTextdraw11[playerid], 3);
PlayerTextDrawSetProportional(playeridTextdraw11[playerid], 1);
PlayerTextDrawSetSelectable(playeridTextdraw11[playerid], true); 
Under onplayerrequestclass
PHP код:
    SelectTextDraw(playeridCOLOR_WHITE);
     
PlayerTextDrawShow(playeridTextdraw0[playerid]);
      
PlayerTextDrawShow(playeridTextdraw1[playerid]);
      
PlayerTextDrawShow(playeridTextdraw2[playerid]);
      
PlayerTextDrawShow(playeridTextdraw3[playerid]);
      
PlayerTextDrawShow(playeridTextdraw4[playerid]);
      
PlayerTextDrawShow(playeridTextdraw5[playerid]);
      
PlayerTextDrawShow(playeridTextdraw6[playerid]);
      
PlayerTextDrawShow(playeridTextdraw7[playerid]);
      
PlayerTextDrawShow(playeridTextdraw8[playerid]);
      
PlayerTextDrawShow(playeridTextdraw9[playerid]);
      
PlayerTextDrawShow(playeridTextdraw10[playerid]);
      
PlayerTextDrawShow(playeridTextdraw11[playerid]); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)