[Ajuda] TextDraw Clicбvel
#1

Porque nгo da para clicar nas textdraws?

pawn Код:
new Text:Textdraw4;
pawn Код:
Textdraw4 = TextDrawCreate(113.000000, 176.000000, "Dados");
    TextDrawBackgroundColor(Textdraw4, 255);
    TextDrawFont(Textdraw4, 2);
    TextDrawLetterSize(Textdraw4, 0.250000, 1.700001);
    TextDrawColor(Textdraw4, -1);
    TextDrawSetOutline(Textdraw4, 0);
    TextDrawSetProportional(Textdraw4, 1);
    TextDrawSetShadow(Textdraw4, 1);
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == Textdraw4)
        {
            // meus sistemas
        }
    return 1;
}
Como nгo consigo fazer para o player antes de spawnar aparecer isso, fiz o seguinte, public e settimerex

pawn Код:
forward Menu();
public Menu()
{
    for(new playerid = 0; playerid < MAX_PLAYERS; 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);
       TogglePlayerControllable(playerid,0);
      SetPlayerCameraPos(playerid, 1725.3129,-1664.0225,20.2297);
      SetPlayerCameraLookAt(playerid, 1723.5891,-1663.4714,20.2298);
      }
}
E Ainda
pawn Код:
SetTimerEx("Menu", 10000, false, "i", playerid);
Ocorre tudo normal, a cвmera seta, as textdraw aparece, porйm nгo dб para clicar nas opзхes...
Reply
#2

TextDrawSetSelectable
Reply
#3

pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == Textdraw4)
        {
            for(new i = 0; i < MAX_TEXT_DRAWS; i++) TextDrawSetSelectable(Text:i, 1);
        }
    return 1;
}
#edit

O Mause nгo aparece...
Reply
#4

pawn Код:
Textdraw4 = TextDrawCreate(113.000000, 176.000000, "Dados");    
TextDrawBackgroundColor(Textdraw4, 255);    
TextDrawFont(Textdraw4, 2);    
TextDrawLetterSize(Textdraw4, 0.250000, 1.700001);    
TextDrawColor(Textdraw4, -1);    
TextDrawSetOutline(Textdraw4, 0);    
TextDrawSetProportional(Textdraw4, 1);    
TextDrawSetShadow(Textdraw4, 1);
TextDrawSetSelectable(Textdraw4, 1);
Basta meteres: TextDrawSetSelectable junto com a criaзгo da textdraw com valor 1
Reply
#5

Nгo funciona, o mause nгo aparece.

# Estou criando o textdraw quando o player estб logado, + uma camera de fundo + o player congelado.

Oque serб?
Reply
#6

Falta https://sampwiki.blast.hk/wiki/SelectTextDraw
Reply
#7

Quote:
Originally Posted by CyNiC
Посмотреть сообщение
Funcionou.

+3 REP.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)