[Ajuda] Definir Evento em Dialog
#1

galera tava tentando coloca o evento em Dialog, mas с to conseguindo, aki o comando para o evento.

pawn Код:
if(strcmp(cmd, "/eventox1", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] >= 4)
            {
                if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                    return 1;
                }
                GetPlayerPos(playerid, trazerx, trazery, trazerz);
                for(new i=0; i<MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        TrazerTodosX1[i] = 1;
                        SendClientMessage(i ,COLOR_LIGHTBLUE, "Admin estб chamando todos para um Evento De Sobrevivкncia!");
                        SendClientMessage(i ,COLOR_LIGHTBLUE, "Digite 'Sim' para ir ou 'Nao' para continuar onde estб.");
                        OnTrazerX1 = 1;
                    }
                }
                if(TrazerTodosX1[playerid] == 1)
                {
                    SetPlayerPos(playerid,-2326.8809,-1636.9822,483.7031);
                    SendClientMessage(playerid ,COLOR_LIGHTRED, "Vocк ativou o /eventox1!");
                    TrazerTodosX1[playerid] = 0;
                    return 1;
                }
                if(OnTrazerX1 == 1)
                {
                    SendClientMessage(playerid ,COLOR_GREY, "Ja estгo usando /trazertodos,use  /destruirtrazer para criar outro!");
                    return 1;
                }
                return 1;
            }
            return 1;
        }
        return 1;
    }
o comando para abrir o Dialog ja fiz.
pawn Код:
if (strcmp("/eventos", cmdtext,true) == 0)
    {
        ShowPlayerDialog(playerid, 3535, DIALOG_STYLE_LIST, "Eventos Brasil Play Atlantis","PaintBall(Chuck Norris)\nEvento X1\nRally\nCorrida de Kart","Ok","Exit");
        return 1;
    }
Agora sу me ajuda a colocar o evento x1 para funcionar no
pawn Код:
if(dialogid == 3535)
    {
        if(response)
        {
            if(listitem == 0)
            {
mas ]n consegui
Reply
#2

pra que isso tudo de return 1;
Reply
#3

Quote:

Agora sу me ajuda a colocar o evento x1 para funcionar no
pawn Код:
if(dialogid == 3535)
    {
        if(response)
        {
            if(listitem == 0)
            {
mas ]n consegui

o listitem == 0 funcionaria para a funзгo de PAINTBALL(CHUCKNORRIS)
para o x1 teria que ser
pawn Код:
if(response)
{
  if(listitem == 0)
{

}
if(listitem == 1)
{
SetPlayerPos(playerid,-2326.8809,-1636.9822,483.7031);
SendClientMessage(playerid ,COLOR_LIGHTRED, "Vocк ativou o /eventox1!");
TrazerTodosX1[playerid] = 0;
}
Seria mais ou menos isso, cada linha seria um listitem ou seja o 1 й os segundo da lista do seu /eventos
sempre comeca do 0
sendo 1 = 0
2 = 1
3 = 2.... e por ai vai

Espero que seja isso
abraзos
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)