[Ajuda] Comando + Dialog
#1

Resolvido
Reply
#2

Edited

pawn Код:
// Topo

#define DIALOG_EVENTOZOMBIE                              10  // Caso jб acha uma dialog com esse ID, mude para outro


// Comando

CMD:criareventozombie(playerid)
{
    ShowPlayerDialogid(playerid, DIALOG_EVENTOZOMBIE, DIALOG_STYLE_LIST, "Escolha seu time", "Humano \nZombie", "Selecionar", "Cancelar");
    return 1;
}

// Public OnPlayerDialogResponse

if(dialogid == DIALOG_EVENTOZOMBIE)
{
    if(response)
    {
        if(listitem == 0)
        {
            // Funзгo ao escolher a ser Humano
        }
        if(listitem == 1)
        {
            // Funзгo ao escolher a ser Zombie
        }
    }
}

// Fiz pelo Wordpad pq to na empresa xD
// se tiver errado avise - me
Reply
#3

vc jah tem o cmd pra cria o evento?
Reply
#4

pawn Код:
ShowPlayerDialogid(playerid, id diaglod, DIALOG_STYLE_LIST,"escolher", "Humano\nZombie", "OK","CANCELAR");
Reply
#5

Quote:
Originally Posted by Murilo_sousa
Посмотреть сообщение
Edited

pawn Код:
// Topo

#define DIALOG_EVENTOZOMBIE                              10  // Caso jб acha uma dialog com esse ID, mude para outro


// Comando

CMD:criareventozombie(playerid)
{
    ShowPlayerDialogid(playerid, DIALOG_EVENTOZOMBIE, DIALOG_STYLE_LIST, "Escolha seu time", "Humano \nZombie", "Selecionar", "Cancelar");
    return 1;
}

// Public OnPlayerDialogResponse

if(dialogid == DIALOG_EVENTOZOMBIE)
{
    if(response)
    {
        if(listitem == 0)
        {
            // Funзгo ao escolher a ser Humano
        }
        if(listitem == 1)
        {
            // Funзгo ao escolher a ser Zombie
        }
    }
}

// Fiz pelo Wordpad pq to na empresa xD
// se tiver errado avise - me
Ele pediu para todos. Entгo..

pawn Код:
// Topo

#define DIALOG_EVENTOZOMBIE                              10  // Caso jб acha uma dialog com esse ID, mude para outro


// Comando

CMD:criareventozombie(playerid)
{
        for(new l = 0; l <MAX_PLAYERS; l++)
        {
              if(IsPlayerConnected(l))
              {
                ShowPlayerDialogid(l, DIALOG_EVENTOZOMBIE, DIALOG_STYLE_LIST, "Escolha seu time", "Humano \nZombie", "Selecionar", "Cancelar");
              }      
        }  
        ShowPlayerDialogid(playerid, DIALOG_EVENTOZOMBIE, DIALOG_STYLE_LIST, "Escolha seu time", "Humano \nZombie", "Selecionar", "Cancelar");
        return 1;
}

// Public OnPlayerDialogResponse

if(dialogid == DIALOG_EVENTOZOMBIE)
{
    if(response)
    {
        if(listitem == 0)
        {
            // Funзгo ao escolher a ser Humano
        }
        if(listitem == 1)
        {
            // Funзгo ao escolher a ser Zombie
        }
    }
}
Reply
#6

Quote:
Originally Posted by @FatalFormat
Посмотреть сообщение
Ele pediu para todos. Entгo..

pawn Код:
// Topo

#define DIALOG_EVENTOZOMBIE                              10  // Caso jб acha uma dialog com esse ID, mude para outro


// Comando

CMD:criareventozombie(playerid)
{
        for(new l = 0; l <MAX_PLAYERS; l++)
        {
              if(IsPlayerConnected(l))
              {
                ShowPlayerDialogid(l, DIALOG_EVENTOZOMBIE, DIALOG_STYLE_LIST, "Escolha seu time", "Humano \nZombie", "Selecionar", "Cancelar");
              }      
        }  
        ShowPlayerDialogid(playerid, DIALOG_EVENTOZOMBIE, DIALOG_STYLE_LIST, "Escolha seu time", "Humano \nZombie", "Selecionar", "Cancelar");
        return 1;
}

// Public OnPlayerDialogResponse

if(dialogid == DIALOG_EVENTOZOMBIE)
{
    if(response)
    {
        if(listitem == 0)
        {
            // Funзгo ao escolher a ser Humano
        }
        if(listitem == 1)
        {
            // Funзгo ao escolher a ser Zombie
        }
    }
}
assim =)

bem observado xD, pensei que era so pra quem executasse o cmd =)
Reply
#7

+REP
Pros 2 ai u-u

vlw
Reply
#8

Quote:
Originally Posted by iSmir
Посмотреть сообщение
+REP
Pros 2 ai u-u

vlw
Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)