Problem with a dialog
#1

Hey dudes.

Here is a dialog (for car license). I explain the problem: when i type the command, the dialog opens, ok.

But when a double click on a listitem, nothing happens. Why ?

Here is the code:

pawn Код:
if(dialogid==83) // Boite а l'autoEcole
        {
            if(!response) return 1;
            switch(listitem)
            {
                case 0:
                {
               
                    new ActDialog=pTest_actualDialog[playerid];
                    if(ActDialog==-1)
                    { // Boite par default
                        pTest_actualDialog[playerid]=0;
                        pTest_actualTest[playerid]=0;
                        //----------------------
               
                        if(PlayerInfo[playerid][pCarLic]!=0)
                            {SendClientMessage(playerid, COLOR_STATS, "[Permis] Vous avez dйja le permis de conduire."); return 1;}
                        if(PlayerInfo[playerid][pCash]<mairie[permis_car])
                        {
                            new string[MAX_STRING_MSG];
                            format(string,sizeof(string),"[Permis] Le passage du permis coute %d$, vous n'avez pas assez.",mairie[permis_car]);
                            SendClientMessage(playerid, COLOR_STATS, string);
                            return 1;
                        }
                        pay_tempPrice[playerid] = mairie[permis_car];
                        pay_tempType[playerid] = 10;
                        pay_tempArticle[playerid] = 1;
                        pay_showDialog(playerid, mairie[permis_car]);
                       
                        //------------------------------------------
                    }
                    else if(ActDialog>0 && ActDialog<10) // Affichage des diffйrents cours, tout est gerй par une fonction !
                    {
                        test_tutoGestionDialog(playerid,pTest_actualTest[playerid]);
                    }
                    else if(ActDialog>=10 && ActDialog<16) // Questions
                    {
                        if(ActDialog==10)
                        {
                            test_showQuestion(playerid,1,pTest_actualTest[playerid]);
                        }
                        else
                        {
                            test_responseQuestion(playerid,ActDialog-10,listitem,pTest_actualTest[playerid]);
                        }
                    }
                }
                case 1:
                { // Vol
               
                    new ActDialog=pTest_actualDialog[playerid];
                    if(ActDialog==-1)
                    { // Boite par default
                        pTest_actualDialog[playerid]=0;
                        pTest_actualTest[playerid]=0;
                        //----------------------
                        if(PlayerInfo[playerid][pFlyLic]!=0)
                            {SendClientMessage(playerid, COLOR_STATS, "[Permis] Vous avez dйja votre licence de vol."); return 1;}
                        if(PlayerInfo[playerid][pCash]<mairie[permis_fly])
                        {
                            new string[MAX_STRING_MSG];
                            format(string,sizeof(string),"[Permis] L'obtention de la licence de vol coute %d$, vous n'avez pas assez.",mairie[permis_fly]);
                            SendClientMessage(playerid, COLOR_STATS, string);
                            return 1;
                        }
                        pay_tempPrice[playerid] = mairie[permis_fly];
                        pay_tempType[playerid] = 10;
                        pay_tempArticle[playerid] = 2;
                        pay_showDialog(playerid, mairie[permis_fly]);
                       
                    //------------------------------------------
                    }
                    else if(ActDialog>0 && ActDialog<10) // Affichage des diffйrents cours, tout est gerй par une fonction !
                    {
                        test_tutoGestionDialog(playerid,pTest_actualTest[playerid]);
                    }
                    else if(ActDialog>=10 && ActDialog<16) // Questions
                    {
                        if(ActDialog==10)
                        {
                            test_showQuestion(playerid,1,pTest_actualTest[playerid]);
                        }
                        else
                        {
                            test_responseQuestion(playerid,ActDialog-10,listitem,pTest_actualTest[playerid]);
                        }
                    }
                }
                case 2:
                { // Rattrapage
                    new ActDialog=pTest_actualDialog[playerid];
                    if(ActDialog==-1)
                    { // Boite par default
                        pTest_actualDialog[playerid]=0;
                        pTest_actualTest[playerid]=0;
                        //----------------------
               
                        if(PlayerInfo[playerid][pCarLic]==0)
                            {SendClientMessage(playerid, COLOR_STATS, "[Permis] Vous n'avez pas le permis de conduire."); return 1;}
                        if(PlayerInfo[playerid][pLicencePoint]+NBR_PTPERMIS>LICENCE_MAX_POINTS)
                            {SendClientMessage(playerid, COLOR_STATS, "[Permis] Vous avez dйja suffisament de points."); return 1;}
                        new priceTotal=PRIX_PTPERMIS*NBR_PTPERMIS;
                        pay_tempPrice[playerid] = priceTotal;
                        pay_tempType[playerid] = 10;
                        pay_tempArticle[playerid] = 3;
                        pay_showDialog(playerid, priceTotal);
                       
                    //------------------------------------------
                    }
                    else if(ActDialog>0 && ActDialog<10) // Affichage des diffйrents cours, tout est gerй par une fonction !
                    {
                        test_tutoGestionDialog(playerid,pTest_actualTest[playerid]);
                    }
                    else if(ActDialog>=10 && ActDialog<16) // Questions
                    {
                        if(ActDialog==10)
                        {
                            test_showQuestion(playerid,1,pTest_actualTest[playerid]);
                        }
                        else
                        {
                            test_responseQuestion(playerid,ActDialog-10,listitem,pTest_actualTest[playerid]);
                        }
                    }
                }
            }
            return 1;
        }
Reply


Messages In This Thread
Problem with a dialog - by LilBob - 05.06.2013, 18:16
Re: Problem with a dialog - by xXitsgodzillaXx - 05.06.2013, 19:29
Re : Problem with a dialog - by LilBob - 05.06.2013, 19:36
Re: Problem with a dialog - by dahley5 - 05.06.2013, 19:52
Re: Problem with a dialog - by SilverKiller - 05.06.2013, 20:09
Re: Problem with a dialog - by dahley5 - 05.06.2013, 21:24
Re: Problem with a dialog - by SilverKiller - 05.06.2013, 22:42
Re : Problem with a dialog - by NvidiaForTheWin - 06.06.2013, 01:54
Re: Problem with a dialog - by dahley5 - 06.06.2013, 02:23
Re: Problem with a dialog - by dahley5 - 06.06.2013, 12:20

Forum Jump:


Users browsing this thread: 1 Guest(s)