[Ajuda] Textdraws selecionбveis
#7

pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if (clickedid == Listadecomandos[2])
    {

        TextDrawHideForPlayer(playerid, TodosComandos[0]);
        TextDrawHideForPlayer(playerid, TodosComandos[1]);
        TextDrawHideForPlayer(playerid, TodosComandos[2]);
        TextDrawHideForPlayer(playerid, TodosComandos[3]);
        TextDrawHideForPlayer(playerid, TodosComandos[4]);
        TextDrawHideForPlayer(playerid, TodosComandos[5]);
        TextDrawHideForPlayer(playerid, TodosComandos[6]);
        TextDrawHideForPlayer(playerid, TodosComandos[7]);
        TextDrawHideForPlayer(playerid, TodosComandos[8]);
        TextDrawHideForPlayer(playerid, TodosComandos[9]);
        TextDrawHideForPlayer(playerid, TodosComandos[10]);
        TextDrawHideForPlayer(playerid, TodosComandos[11]);
        TextDrawHideForPlayer(playerid, TodosComandos[12]);
        TextDrawHideForPlayer(playerid, TodosComandos[13]);
        TextDrawHideForPlayer(playerid, TodosComandos[14]);
        TextDrawHideForPlayer(playerid, TodosComandos[15]);
        TextDrawHideForPlayer(playerid, TodosComandos[16]);
        TextDrawHideForPlayer(playerid, TodosComandos[17]);
        TextDrawHideForPlayer(playerid, TodosComandos[18]);
        TextDrawHideForPlayer(playerid, TodosComandos[19]);
        TextDrawHideForPlayer(playerid, TodosComandos[20]);
        TextDrawHideForPlayer(playerid, TodosComandos[21]);
        TextDrawHideForPlayer(playerid, TodosComandos[22]);
        TextDrawHideForPlayer(playerid, TodosComandos[23]);
        TextDrawHideForPlayer(playerid, TodosComandos[24]);
        TextDrawHideForPlayer(playerid, TodosComandos[25]);
        TextDrawHideForPlayer(playerid, TodosComandos[26]);
        TextDrawHideForPlayer(playerid, TodosComandos[27]);
        TextDrawHideForPlayer(playerid, TodosComandos[28]);
        TextDrawHideForPlayer(playerid, TodosComandos[29]);
        TextDrawHideForPlayer(playerid, TodosComandos[30]);
        TextDrawHideForPlayer(playerid, TodosComandos[31]);
        TextDrawHideForPlayer(playerid, TodosComandos[32]);
        TextDrawHideForPlayer(playerid, TodosComandos[33]);
        TextDrawHideForPlayer(playerid, TodosComandos[34]);
        TextDrawHideForPlayer(playerid, TodosComandos[35]);
        TextDrawHideForPlayer(playerid, TodosComandos[36]);
        TextDrawHideForPlayer(playerid, TodosComandos[37]);
        TextDrawHideForPlayer(playerid, TodosComandos[38]);
        TextDrawHideForPlayer(playerid, TodosComandos[39]);

        TextDrawShowForPlayer(playerid, Novidades[0]);
        TextDrawShowForPlayer(playerid, Novidades[1]);
        TextDrawShowForPlayer(playerid, Novidades[2]);
        TextDrawShowForPlayer(playerid, Novidades[3]);

        return 1;
    }
    if (clickedid == Listadecomandos[3])
    {
        OnPlayerCommandText(playerid, "/membros");
        EsconderTexts(playerid);

        return 1;
    }
    if (clickedid == Listadecomandos[4])
    {
        TextDrawHideForPlayer(playerid, Novidades[0]);
        TextDrawHideForPlayer(playerid, Novidades[1]);
        TextDrawHideForPlayer(playerid, Novidades[2]);
        TextDrawHideForPlayer(playerid, Novidades[3]);

        TextDrawShowForPlayer(playerid, TodosComandos[0]);
        TextDrawShowForPlayer(playerid, TodosComandos[1]);
        TextDrawShowForPlayer(playerid, TodosComandos[2]);
        TextDrawShowForPlayer(playerid, TodosComandos[3]);
        TextDrawShowForPlayer(playerid, TodosComandos[4]);
        TextDrawShowForPlayer(playerid, TodosComandos[5]);
        TextDrawShowForPlayer(playerid, TodosComandos[6]);
        TextDrawShowForPlayer(playerid, TodosComandos[7]);
        TextDrawShowForPlayer(playerid, TodosComandos[8]);
        TextDrawShowForPlayer(playerid, TodosComandos[9]);
        TextDrawShowForPlayer(playerid, TodosComandos[10]);
        TextDrawShowForPlayer(playerid, TodosComandos[11]);
        TextDrawShowForPlayer(playerid, TodosComandos[12]);
        TextDrawShowForPlayer(playerid, TodosComandos[13]);
        TextDrawShowForPlayer(playerid, TodosComandos[14]);
        TextDrawShowForPlayer(playerid, TodosComandos[15]);
        TextDrawShowForPlayer(playerid, TodosComandos[16]);
        TextDrawShowForPlayer(playerid, TodosComandos[17]);
        TextDrawShowForPlayer(playerid, TodosComandos[18]);
        TextDrawShowForPlayer(playerid, TodosComandos[19]);
        TextDrawShowForPlayer(playerid, TodosComandos[20]);
        TextDrawShowForPlayer(playerid, TodosComandos[21]);
        TextDrawShowForPlayer(playerid, TodosComandos[22]);
        TextDrawShowForPlayer(playerid, TodosComandos[23]);
        TextDrawShowForPlayer(playerid, TodosComandos[24]);
        TextDrawShowForPlayer(playerid, TodosComandos[25]);
        TextDrawShowForPlayer(playerid, TodosComandos[26]);
        TextDrawShowForPlayer(playerid, TodosComandos[27]);
        TextDrawShowForPlayer(playerid, TodosComandos[28]);
        TextDrawShowForPlayer(playerid, TodosComandos[29]);
        TextDrawShowForPlayer(playerid, TodosComandos[30]);
        TextDrawShowForPlayer(playerid, TodosComandos[31]);
        TextDrawShowForPlayer(playerid, TodosComandos[32]);
        TextDrawShowForPlayer(playerid, TodosComandos[33]);
        TextDrawShowForPlayer(playerid, TodosComandos[34]);
        TextDrawShowForPlayer(playerid, TodosComandos[35]);
        TextDrawShowForPlayer(playerid, TodosComandos[36]);
        TextDrawShowForPlayer(playerid, TodosComandos[37]);
        TextDrawShowForPlayer(playerid, TodosComandos[38]);
        TextDrawShowForPlayer(playerid, TodosComandos[39]);

        return 1;
    }
    if (clickedid == Listadecomandos[5])
    {

        ShowPlayerDialog(playerid, 12458, DIALOG_STYLE_INPUT, "Procurar Rбdios", "Digite uma palavra chave:", "Search", "Cancel");
        EsconderTexts(playerid);
        return 1;
    }
    if (clickedid == Listadecomandos[6])
    {
        EsconderTexts(playerid);
        return 1;
    }
    if (clickedid == Listadecomandos[7])
    {
        EsconderTexts(playerid);
        return 1;
    }
    if (clickedid == Listadecomandos[8])
    {
        EsconderTexts(playerid);
        return 1;
    }
    if (clickedid == Listadecomandos[11])
    {
        TextDrawHideForPlayer(playerid, Novidades[0]);
        TextDrawHideForPlayer(playerid, Novidades[1]);
        TextDrawHideForPlayer(playerid, Novidades[2]);
        TextDrawHideForPlayer(playerid, Novidades[3]);
       
        TextDrawHideForPlayer(playerid, TodosComandos[0]);
        TextDrawHideForPlayer(playerid, TodosComandos[1]);
        TextDrawHideForPlayer(playerid, TodosComandos[2]);
        TextDrawHideForPlayer(playerid, TodosComandos[3]);
        TextDrawHideForPlayer(playerid, TodosComandos[4]);
        TextDrawHideForPlayer(playerid, TodosComandos[5]);
        TextDrawHideForPlayer(playerid, TodosComandos[6]);
        TextDrawHideForPlayer(playerid, TodosComandos[7]);
        TextDrawHideForPlayer(playerid, TodosComandos[8]);
        TextDrawHideForPlayer(playerid, TodosComandos[9]);
        TextDrawHideForPlayer(playerid, TodosComandos[10]);
        TextDrawHideForPlayer(playerid, TodosComandos[11]);
        TextDrawHideForPlayer(playerid, TodosComandos[12]);
        TextDrawHideForPlayer(playerid, TodosComandos[13]);
        TextDrawHideForPlayer(playerid, TodosComandos[14]);
        TextDrawHideForPlayer(playerid, TodosComandos[15]);
        TextDrawHideForPlayer(playerid, TodosComandos[16]);
        TextDrawHideForPlayer(playerid, TodosComandos[17]);
        TextDrawHideForPlayer(playerid, TodosComandos[18]);
        TextDrawHideForPlayer(playerid, TodosComandos[19]);
        TextDrawHideForPlayer(playerid, TodosComandos[20]);
        TextDrawHideForPlayer(playerid, TodosComandos[21]);
        TextDrawHideForPlayer(playerid, TodosComandos[22]);
        TextDrawHideForPlayer(playerid, TodosComandos[23]);
        TextDrawHideForPlayer(playerid, TodosComandos[24]);
        TextDrawHideForPlayer(playerid, TodosComandos[25]);
        TextDrawHideForPlayer(playerid, TodosComandos[26]);
        TextDrawHideForPlayer(playerid, TodosComandos[27]);
        TextDrawHideForPlayer(playerid, TodosComandos[28]);
        TextDrawHideForPlayer(playerid, TodosComandos[29]);
        TextDrawHideForPlayer(playerid, TodosComandos[30]);
        TextDrawHideForPlayer(playerid, TodosComandos[31]);
        TextDrawHideForPlayer(playerid, TodosComandos[32]);
        TextDrawHideForPlayer(playerid, TodosComandos[33]);
        TextDrawHideForPlayer(playerid, TodosComandos[34]);
        TextDrawHideForPlayer(playerid, TodosComandos[35]);
        TextDrawHideForPlayer(playerid, TodosComandos[36]);
        TextDrawHideForPlayer(playerid, TodosComandos[37]);
        TextDrawHideForPlayer(playerid, TodosComandos[38]);
        TextDrawHideForPlayer(playerid, TodosComandos[39]);
       
        TextDrawShowForPlayer(playerid, CarrosdoServidor[0]);
        TextDrawShowForPlayer(playerid, CarrosdoServidor[1]);
        TextDrawShowForPlayer(playerid, CarrosdoServidor[2]);
        TextDrawShowForPlayer(playerid, CarrosdoServidor[3]);


       
        return 1;
    }
    if (clickedid == Listadecomandos[10]) // SAIR
    {
        EsconderTexts(playerid);
        return 1;
    }



    if (clickedid == CarrosdoServidor[1])
    {
        OnPlayerCommandText(playerid, "/car elegy 0 0");
        EsconderTexts(playerid);
        return 1;
    }
    if (clickedid == CarrosdoServidor[2])
    {
        OnPlayerCommandText(playerid, "/car sabre 0 0");
        EsconderTexts(playerid);
        return 1;
    }


    return 1;
}

pawn Код:
stock EsconderTexts(playerid)
{

   TextDrawHideForPlayer(playerid, Listadecomandos[0]);   TextDrawHideForPlayer(playerid, Listadecomandos[1]);
   TextDrawHideForPlayer(playerid, Listadecomandos[2]);   TextDrawHideForPlayer(playerid, Listadecomandos[3]);
   TextDrawHideForPlayer(playerid, Listadecomandos[4]);   TextDrawHideForPlayer(playerid, Listadecomandos[5]);
   TextDrawHideForPlayer(playerid, Listadecomandos[6]);   TextDrawHideForPlayer(playerid, Listadecomandos[7]);
   TextDrawHideForPlayer(playerid, Listadecomandos[8]);   TextDrawHideForPlayer(playerid, Listadecomandos[9]);
   TextDrawHideForPlayer(playerid, Listadecomandos[10]);  TextDrawHideForPlayer(playerid, Listadecomandos[11]);
   
   
        TextDrawHideForPlayer(playerid, TodosComandos[0]);
        TextDrawHideForPlayer(playerid, TodosComandos[1]);
        TextDrawHideForPlayer(playerid, TodosComandos[2]);
        TextDrawHideForPlayer(playerid, TodosComandos[3]);
        TextDrawHideForPlayer(playerid, TodosComandos[4]);
        TextDrawHideForPlayer(playerid, TodosComandos[5]);
        TextDrawHideForPlayer(playerid, TodosComandos[6]);
        TextDrawHideForPlayer(playerid, TodosComandos[7]);
        TextDrawHideForPlayer(playerid, TodosComandos[8]);
        TextDrawHideForPlayer(playerid, TodosComandos[9]);
        TextDrawHideForPlayer(playerid, TodosComandos[10]);
        TextDrawHideForPlayer(playerid, TodosComandos[11]);
        TextDrawHideForPlayer(playerid, TodosComandos[12]);
        TextDrawHideForPlayer(playerid, TodosComandos[13]);
        TextDrawHideForPlayer(playerid, TodosComandos[14]);
        TextDrawHideForPlayer(playerid, TodosComandos[15]);
        TextDrawHideForPlayer(playerid, TodosComandos[16]);
        TextDrawHideForPlayer(playerid, TodosComandos[17]);
        TextDrawHideForPlayer(playerid, TodosComandos[18]);
        TextDrawHideForPlayer(playerid, TodosComandos[19]);
        TextDrawHideForPlayer(playerid, TodosComandos[20]);
        TextDrawHideForPlayer(playerid, TodosComandos[21]);
        TextDrawHideForPlayer(playerid, TodosComandos[22]);
        TextDrawHideForPlayer(playerid, TodosComandos[23]);
        TextDrawHideForPlayer(playerid, TodosComandos[24]);
        TextDrawHideForPlayer(playerid, TodosComandos[25]);
        TextDrawHideForPlayer(playerid, TodosComandos[26]);
        TextDrawHideForPlayer(playerid, TodosComandos[27]);
        TextDrawHideForPlayer(playerid, TodosComandos[28]);
        TextDrawHideForPlayer(playerid, TodosComandos[29]);
        TextDrawHideForPlayer(playerid, TodosComandos[30]);
        TextDrawHideForPlayer(playerid, TodosComandos[31]);
        TextDrawHideForPlayer(playerid, TodosComandos[32]);
        TextDrawHideForPlayer(playerid, TodosComandos[33]);
        TextDrawHideForPlayer(playerid, TodosComandos[34]);
        TextDrawHideForPlayer(playerid, TodosComandos[35]);
        TextDrawHideForPlayer(playerid, TodosComandos[36]);
        TextDrawHideForPlayer(playerid, TodosComandos[37]);
        TextDrawHideForPlayer(playerid, TodosComandos[38]);
        TextDrawHideForPlayer(playerid, TodosComandos[39]);
       
       
        TextDrawHideForPlayer(playerid, CarrosdoServidor[0]);
        TextDrawHideForPlayer(playerid, CarrosdoServidor[1]);
        TextDrawHideForPlayer(playerid, CarrosdoServidor[2]);
        TextDrawHideForPlayer(playerid, CarrosdoServidor[3]);
       
   
        TextDrawHideForPlayer(playerid, Novidades[0]);
        TextDrawHideForPlayer(playerid, Novidades[1]);
        TextDrawHideForPlayer(playerid, Novidades[2]);
        TextDrawHideForPlayer(playerid, Novidades[3]);

    TextDrawShowForPlayer(playerid, ADLOGO[0]);
    CancelSelectTextDraw(playerid); // Funзгo para voltar o mouse ao normal
    return 1;
}

Tem alguma coisa de errada ai pessoal ? por que parece que todos os menus estгo retornando ao menu no carro e eles sу se fecham quando algo funciona como por exemplo eu selecionando um carro.
Reply


Messages In This Thread
Textdraws selecionбveis - by junioor - 24.07.2013, 00:22
Re: Textdraws selecionбveis - by GabrielSantos - 24.07.2013, 00:24
Re: Textdraws selecionбveis - by junioor - 24.07.2013, 00:30
Re: Textdraws selecionбveis - by GabrielSantos - 24.07.2013, 00:39
Re: Textdraws selecionбveis - by junioor - 24.07.2013, 00:57
Re: Textdraws selecionбveis - by focaximubh - 24.07.2013, 01:01
Re: Textdraws selecionбveis - by junioor - 24.07.2013, 20:07
Re: Textdraws selecionбveis - by junioor - 25.07.2013, 02:16

Forum Jump:


Users browsing this thread: 1 Guest(s)