SA-MP Forums Archive
[Ajuda] Comando + Dialog - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Comando + Dialog (/showthread.php?tid=392964)



Dialog + MySQL - smiiir - 16.11.2012

Resolvido


Re: Comando + Dialog - Maklister - 16.11.2012

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



Re: Comando + Dialog - Zona_Sky - 16.11.2012

vc jah tem o cmd pra cria o evento?


Re: Comando + Dialog - Wallker - 16.11.2012

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



Re: Comando + Dialog - @FatalFormat - 16.11.2012

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
        }
    }
}



Re: Comando + Dialog - Maklister - 16.11.2012

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 =)


Re: Comando + Dialog - smiiir - 16.11.2012

+REP
Pros 2 ai u-u

vlw


Re: Comando + Dialog - Maklister - 16.11.2012

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

vlw
Thanks