Jump to content
  • 0

Problema Dialog


1Shot

Question

Salut, am o problema cu Dialog Box-ul. Am un dialog la DealerShip, in care daca apesi "Select" (prima optiune) iti cumpara masina respectiva, iar daca apesi "Close" (a doua optiune) ar trebui sa iti inchida dialog-ul, sa te teleporteze in fata la dealership, sa iti mute camera inapoi pe tine, etc.

In schimb, mie doar imi inchide dialog-ul, dar nu ma teleporteaza inapoi in fata la dealership si nu imi repozitioneaza camera pe mine... In schimb, daca apas tasta ESC, totul merge perfect, dar daca apas Close pe dialog doar imi inchide dialog-ul si atat...ma lasa cu camera pe dealership, cu virtual world 60, etc.

Sper ca ma puteti ajuta! Multumesc! Acesta este scriptul:

    if(dialogid == DIALOG_CARBUY)
    {
        if(!response)
        {
            SetPlayerPos(playerid, 2131.7500, -1150.4370, 24.1570);
            TogglePlayerControllable(playerid, 1);
            SetCameraBehindPlayer(playerid);
            SetPlayerVirtualWorld(playerid, 0);
        }
        else if(response)
        {
            new stringz[3000], stringy[3000], stringx[3000];
            if(listitem == 0)
            {
                for(new xf = 0; xf < MAX_PERSONAL_CARS; xf++)
                {
                    if(Stock[xf][vPrice] > 0 && Stock[xf][vPrice] <= 7000000)
                    {
                        format(stringy, sizeof(stringy), "{FFFFFF}%s\t{FFFFFF}$%d\t{FFFFFF}%d\n", Stock[xf][vName], Stock[xf][vPrice], Stock[xf][vStock]);
                          strcat(stringz, stringy);
                    }
                }
                format(stringx, sizeof(stringx), "Vehicle\tPrice\tStock\n");
                strins(stringz, stringx, 0);
                ShowPlayerDialog(playerid, DIALOG_CARBUY2, DIALOG_STYLE_TABLIST_HEADERS, "{357AB7}Freakz: {FFFFFF}Dealership", stringz, "Select", "Close");
            }
            if(listitem == 1)
            {
                for(new xf = 0; xf < MAX_PERSONAL_CARS; xf++)
                {
                    if(Stock[xf][vPrice] > 7000000 && Stock[xf][vPrice] <= 19999999)
                    {
                        format(stringy, sizeof(stringy), "{FFFFFF}%s\t{FFFFFF}$%d\t{FFFFFF}%d\n", Stock[xf][vName], Stock[xf][vPrice], Stock[xf][vStock]);
                          strcat(stringz, stringy);
                    }
                }
                format(stringx, sizeof(stringx), "Vehicle\tPrice\tStock\n");
                strins(stringz, stringx, 0);
                ShowPlayerDialog(playerid, DIALOG_CARBUY3, DIALOG_STYLE_TABLIST_HEADERS, "{357AB7}Freakz: {FFFFFF}Dealership", stringz, "Select", "Close");
            }
            if(listitem == 2)
            {
                for(new xf = 0; xf < MAX_PERSONAL_CARS; xf++)
                {
                    if(Stock[xf][vPrice] >= 20000000 && Stock[xf][vPrice] < 50000000)
                    {
                        format(stringy, sizeof(stringy), "{FFFFFF}%s\t{FFFFFF}$%d\t{FFFFFF}%d\n", Stock[xf][vName], Stock[xf][vPrice], Stock[xf][vStock]);
                          strcat(stringz, stringy);
                    }
                }
                format(stringx, sizeof(stringx), "Vehicle\tPrice\tStock\n");
                strins(stringz, stringx, 0);
                ShowPlayerDialog(playerid, DIALOG_CARBUY4, DIALOG_STYLE_TABLIST_HEADERS, "{357AB7}Freakz: {FFFFFF}Dealership", stringz, "Select", "Close");
            }
        }
        return 1;
    }

 

Edited by 1Shot
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

pune putin partea unde se creeaza dialogul

  • Like 1
Citat
Link to comment
Share on other sites

  • 0

nu prea vad unde ar fi problema, vezi daca mai folosesti acelasi dialog ( DIALOG_CARBUY ) undeva

  • Like 1
Citat
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.