Help select textdraw
#1

i have this code
PHP код:
CMD:showtd(playerid,params[])
{
    
ShowTextdraw(playerid);
    
SelectTextDraw(playerid0x9999BBBB);
    return 
1;

and the
PHP код:
stock ShowTextDraw(playerid)
{
    
TextDrawShowForPlayer(playerid,Textdraw0);
    
TextDrawShowForPlayer(playerid,Textdraw1);
    
TextDrawShowForPlayer(playerid,Textdraw2);
    
TextDrawShowForPlayer(playerid,Textdraw3);
    
TextDrawShowForPlayer(playerid,Textdraw4);
    
TextDrawShowForPlayer(playerid,Textdraw5);
    
TextDrawShowForPlayer(playerid,Textdraw6);
    
TextDrawShowForPlayer(playerid,Textdraw7);
    
TextDrawShowForPlayer(playerid,Textdraw8);
    
TextDrawShowForPlayer(playerid,Textdraw9);
    
TextDrawShowForPlayer(playerid,Textdraw10);
    
TextDrawShowForPlayer(playerid,Textdraw11);
    
TextDrawShowForPlayer(playerid,Textdraw12);
    
TextDrawShowForPlayer(playerid,Textdraw13);
    
TextDrawShowForPlayer(playerid,Textdraw14);
    
TextDrawShowForPlayer(playerid,Textdraw15);
    
TextDrawShowForPlayer(playerid,Textdraw16);

but when i type the command /showtd it have a textdraw but i can't select it... why?
Reply
#2

Any help please
Reply
#3

This may help you :
https://sampwiki.blast.hk/wiki/SelectTextdraw

And if you can click on the textdraw and nothing happens try that:
https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw
Reply
#4

yep i do just like that and when i'm type the command it have a textdraw but i can't click any textdraw
Reply
#5

Use
https://sampwiki.blast.hk/wiki/TextDrawSetSelectable
when you create those textdraws.

Example:
pawn Код:
TextDrawSetSelectable(Textdraw0, 1);
TextDrawSetSelectable(Textdraw1, 1);
TextDrawSetSelectable(Textdraw2, 1);
TextDrawSetSelectable(Textdraw3, 1);
TextDrawSetSelectable(Textdraw4, 1);
TextDrawSetSelectable(Textdraw5, 1);
TextDrawSetSelectable(Textdraw6, 1);
TextDrawSetSelectable(Textdraw7, 1);
TextDrawSetSelectable(Textdraw8, 1);
TextDrawSetSelectable(Textdraw9, 1);
TextDrawSetSelectable(Textdraw10, 1);
TextDrawSetSelectable(Textdraw11, 1);
TextDrawSetSelectable(Textdraw12, 1);
TextDrawSetSelectable(Textdraw13, 1);
TextDrawSetSelectable(Textdraw14, 1);
TextDrawSetSelectable(Textdraw15, 1);
TextDrawSetSelectable(Textdraw16, 1);
^ you should put these after you create the textdraws.

If you used that function, then I think you didn't used TextDrawTextSize. "This function defines the clickable area for use with TextDrawSetSelectable, whether a box is shown or not."
Reply
#6

did you added this to the textdraw that should be clickable:
https://sampwiki.blast.hk/wiki/TextDrawSetSelectable
Reply
#7

i make my command just like the textdrawsetselectable
here
PHP код:
CMD:showtd(playerid,params[])
{
    
TextDrawSetSelectable(Text:Textdraw5,1);
    
TextDrawSetSelectable(Text:Textdraw6,1);
    
TextDrawSetSelectable(Text:Textdraw8,1);
    
TextDrawSetSelectable(Text:Textdraw10,1);
    
TextDrawSetSelectable(Text:Textdraw11,1);
    
TextDrawSetSelectable(Text:Textdraw12,1);
    
ShowTextdraw(playerid);
    
SelectTextDraw(playerid0x9999BBBB);
    return 
1;

But it not work
Reply
#8

HELP!!!
Reply
#9

Under OnGameModeInit add TextDrawSetSelectable lines
and don't change /showtd
i'm not really good about this but i think it might work.
Reply
#10

I put it on filterscript init like this
pawn Код:
public OnFilterScriptInit()
{
TextDrawSetSelectable(Text:Textdraw5,1);
TextDrawSetSelectable(Text:Textdraw6,1);
TextDrawSetSelectable(Text:Textdraw8,1);
TextDrawSetSelectable(Text:Textdraw10,1);
TextDrawSetSelectable(Text:Textdraw11,1);
TextDrawSetSelectable(Text:Textdraw12,1)
return 1;
}
and the commands
pawn Код:
CMD:iphone(playerid,params[])
{
    ShowIphone(playerid);
    SelectTextDraw(playerid, 0x9999BBBB);
    return 1;
}
Not work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)