Dialog Help.
#1

Hello,

So I've created a command called '/tp' It's a command that brings up a DIALOG_STYLE_LIST. The problem is though, when I type the command, and then click on an option the dialog dissapears straight away.

Just saying, the code is really big.

The command:
pawn Код:
if (strcmp("/tp", cmdtext, true, 10) == 0)
    {
    ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Teleport Categories", "Los Santos\nSan Fierro\nLas Venturas\nOther", "Select", "Cancel");
    return 1;
    }
The OnDialogResponse part:

pawn Код:
if(dialogid == DIALOGID) // Teleport Dialog
        {
                if(response)
                {
                        if(listitem == 0) // Los Santos
                        {
                        ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_LIST, "Los Santos", "Los Santos Airport \nSanta Marina \nGrove Street \nCity Hall \nPolice Station \nBank\nLS Tower \nOcean Docks \nMadd Doggs Mansion \nJefferson Motel \nAbove Los Santos \nBack", "Select", "Cancel");
                        }
                        if(listitem == 1) // San Fierro
                        {
                        ShowPlayerDialog(playerid, DIALOGID+2, DIALOG_STYLE_LIST, "San Fierro", "San Fierro Airport \nCity Hall \nBank \nOcean Flats \nMissionary Hill \nJizzys Pleasure Dome \nPolice Station  \nBack", "Select", "Cancel");
                        }
                        if(listitem == 2) // Las Venturas
                        {
                        ShowPlayerDialog(playerid, DIALOGID+3, DIALOG_STYLE_LIST, "Las Venturas", "Las Venturas Airport \nArea69 \nCity Hall \nPolice Station \nCaligulas Casino \nStarfish Casino \nBank \nPrickle Pine \nBandit Stadium \nLast Dime Motel \nAbove Las Venturas \nBack", "Select", "Cancel");
                        }
                        if(listitem == 3) // Other
                        {
                        ShowPlayerDialog(playerid, DIALOGID+4, DIALOG_STYLE_LIST, "Other", "Verdant Meadows \nBayside \nPalominmo Creek \nMontgomery \nBlueberry \nDrylake \nSniper Death Match \nBike Race \nCar Race \nMount Chilliad Cabin \nTop of Mount Chilliad \nMount Chilliad \nBack", "Select", "Cancel");
                        }
                }
                return 1;
        }

        if(dialogid == DIALOGID+1) // Los Santos
        {
                if(response)
                {
                        if(listitem == 0) // Airport
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 1934.8811,-2305.5283,13.5469);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Los Santos Airport.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Los Santos Airport through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 1) //Santa Marina
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 433.1179,-1796.5649,5.5469);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Santa Marina Beach.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Santa Marina Beach through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 2) // Grove Street
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 2499.8733,-1667.6309,13.3512);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Grove Street.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Grove Street through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 3) // City Hall
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 1461.0043,-1019.4626,24.6975);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Los Santos City Hall.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Los Santos City Hall through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 4) // Police Station
                        {
                        SetPlayerPos(playerid, 1544.8700,-1675.8081,13.5593);
                        SetPlayerFacingAngle(playerid, 90);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Los Santos Police Department.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Los Santos Police Dpt. through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 5) // Bank
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 595.1895,-1243.1205,18.0844);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Los Santos Bank.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Los Santos Bank through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 8) // LS tower
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 1547.7777,-1365.6631,326.2109);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to LS Star Tower.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to LS Tower through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 6) // Ocean Docks
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 2791.1782,-2534.6309,13.6303);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Ocean Docks.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Ocean Docks through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 7) // Crazybob's House
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 1255.2925,-778.2413,92.0302);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Madd Dogg's Mansion.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Madd Dogg's Mansion through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 8) // Jefferson Motel
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 2229.0200,-1159.8000,25.7981);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Jefferson Motel.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Jefferson Motel through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 9) // Above Los Santos
                        {
                        SetPlayerPos(playerid, 1744.1571,-1426.3916,1513.2897);
                        SetPlayerFacingAngle(playerid, 0);

                        GivePlayerWeapon(playerid, 46, 1);
                        SendClientMessage(playerid, 0x00FFFFAA, "You got a parachute.");
                        }
                        if(listitem == 10) // Back
                        {
                ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Teleport Categories", "Los Santos\nSan Fierro\nLas Venturas\nOther", "Select", "Cancel");
                        }
                }
                return 1;
        }

        if(dialogid == DIALOGID+2) // San Fierro
        {
                if(response)
                {
                        if(listitem == 0) // Airport
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, -1315.9419,-223.8595,14.1484);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to San Fierro Airport.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to San Fierro Airport through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 1) // City Hall
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, -2672.6116,1268.4943,55.9456);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to San Fierro City Hall.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to San Fierro City Hall through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 2) // Bank
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, -2050.6089,459.3649,35.1719);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to San Fierro Bank.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to San Fierro Bank through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 3) // Ocen Flats
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, -2670.1101,-4.9832,6.1328);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Ocean Flats.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Ocean Flats through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 4) // Missionary Hill
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, -2515.6768,-611.6651,132.5625);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Missionary Hill.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Missionary Hill through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 5) // Jizzy's Pleasure Dome
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, -2621.0244,1403.7534,7.0938);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Jizzy's Pleasure Dome.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Jizzy's Pleasure Dome through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 6) // Police Station
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, -1608.1376,718.9722,12.4356);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to San Fierro Police Station.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to San Fierro Police Dpt. through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 7) // Back
                        {
                ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Teleport Categories", "Los Santos\nSan Fierro\nLas Venturas\nOther", "Select", "Cancel");
                        }
                }
                return 1;
        }

        if(dialogid == DIALOGID+3) // Las Venturas
        {
                if(response)
                {
                        if(listitem == 0) // Airport
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 1487.9703,1736.9537,10.8125);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Las Venturas Airport.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Las Venturas Airport through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 1) // Area69
                        {
                        SetPlayerPos(playerid, 129.3000, 1920.3000, 20.0);
                        GameTextForPlayer(playerid,"~W~Welcome to ~G~Area 69~W~!",1000,0);
                        SetPlayerInterior(playerid,0);
                        }
                        if(listitem == 2) // City Hall
                        {
                        SetPlayerPos(playerid, 2421.7185,1121.9866,10.8125);
                        SetPlayerFacingAngle(playerid, 90);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Las Venturas City Hall.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Las Venturas City Hall through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 3) // Police Station
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 2287.2561,2426.2576,10.8203);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Las Venturas Police Station.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Las Venturas Police Station through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 4) // Caligulas Casino
                        {
                        SetPlayerPos(playerid, 2187.8350,1678.5358,11.1094);
                        SetPlayerFacingAngle(playerid, 90);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Caligulas Casino.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Caligulas Casino through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 5) // Starfish Casino
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 2227.3596,1894.3228,10.6719);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Starfish Casino.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Starfish Casino through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 6) // Bank
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 2463.6680,2240.7524,10.8203);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Las Venturas Bank.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Las Venturas Bank through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 7) // Prickle Pine
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 1434.6989,2654.4026,11.3926);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Prickle Pine.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Prickle Pine through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 8) // Bandit Stadium
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 1493.2443,2238.1526,11.0291);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Bandit Stadium.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Bandit Stadium through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 9) // Last Dime Motel
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 1929.0522,707.8507,10.8203);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Last Dime Motel.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Last Dime Motel through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 10) // Above Las Venturas
                        {
                        SetPlayerPos(playerid, 2201.6697,1997.7933,1500.1992);
                        SetPlayerFacingAngle(playerid, 0);

                        GivePlayerWeapon(playerid, 46, 1);
                        SendClientMessage(playerid, 0x00FFFFAA, "You got a parachute.");
                        }
                        if(listitem == 11) // Back
                        {
                ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Teleport Categories", "Los Santos\nSan Fierro\nLas Venturas\nOther", "Select", "Cancel");
                        }
                }
                return 1;
        }

        if(dialogid == DIALOGID+4) // Other
        {
                if(response)
                {
                        if(listitem == 0) // Verdant Meadows
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 414.9159,2532.9700,19.1484);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Verdant Meadows.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Verdant Meadows through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 1) // Bayside
                        {
                        SetPlayerPos(playerid, -2271.0764, 2317.8457, 4.8202);
                        SetPlayerFacingAngle(playerid, 180);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Bayside.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to bayside through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 2) // Palomino Creek
                        {
                        SetPlayerPos(playerid, 2259.5532, -85.0334, 26.5107);
                        SetPlayerFacingAngle(playerid, 180);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Palomino Creek.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Palomino Creek through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 3) // Montgomery
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 1377.4314,271.4077,19.5669);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Montgomery.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Montgomery through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 4) // Blueberry
                        {
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, 183.9907,-108.5440,2.0234);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Blueberry.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Blueberry through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 5) // Drylake
                        {
                        SetPlayerPos(playerid, -12.7000, 1481.7000, 14.00);
                        GameTextForPlayer(playerid,"~W~Welcome to ~B~Dry lake~W~!", 1000, 0);
                        SetPlayerInterior(playerid,0);
                        }
                        if(listitem == 9) // Mount Chilliad Cabin
                        {
                        SetPlayerPos(playerid, -2809.0000, -1516.5000, 142.0000);
                        SetPlayerFacingAngle(playerid, 270);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to the cabin at Mount Chilliad.");
                        GameTextForPlayer(playerid,"~W~Welcome to~N~~R~~H~Mount Chilliad Cabin~W~!",1000,0);
                        }
                        if(listitem == 10) // Top of Mount Chilliad
                        {
                        SetPlayerPos(playerid, -2238.0000, -1712.2700, 482.0000);
                        SetPlayerFacingAngle(playerid, 90);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported on top of Mount Chilliad.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Mt Chilliad through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 11) // Mount Chilliad
                        {
                        SetPlayerPos(playerid, -2409.5000, -2190.0000, 35.0000);
                        SetPlayerFacingAngle(playerid, 270);
                        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Mount Chilliad.");

                        new name[MAX_PLAYER_NAME+1], string[84];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "[TELEPORT] - %s[%d] has teleported to Mount Chilliad through the /tp menu!", name, playerid);
                        SendClientMessageToAll(COLOR_ORANGE, string);
                        }
                        if(listitem == 12) // Back
                        {
                        ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Teleport Categories", "Los Santos\nSan Fierro\nLas Venturas\nOther", "Select", "Cancel");
                        }
                }
                return 1;
        }
Thanks!
Reply
#2

Try returning 0 at the end of OnDialogResponse callback to all your scripts.
Reply
#3

Do I just change the 'return 1;' to return 0?
Reply
#4

Yes, you need to allow the dialog to be passed to other scripts too in case it was not found in the first one which gets called.
Reply
#5

Done that to all returns in the OnDialogResponse. Still does the same.

EDIT: I was using Konstantinos solution but I forgot to restart my server!

Thanks for the help!
Reply
#6

You should define names for your dialogs, not DIALOGID+1, DIALOGID+2, DIALOGID+3 etc.....

Define them in the beginning of your script:
Код:
#define TP_DIALOG 0
#define TP_LS_DIALOG 1
#define TP_SF_DIALOG 2
#define TP_LV_DIALOG 3
#define TP_OTHER_DIALOG 4
If you define them like that, you can just check for the dialogid like this:
Код:
if(dialogid == TP_DIALOG)
{
    ....
}
else if(dialogid == TP_LS_DIALOG)
{
    ....
}
else if(dialogid == TP_SF_DIALOG)
{
    ....
}
else if(dialogid == TP_LV_DIALOG)
{
    ....
}
else if(dialogid == TP_OTHER_DIALOG)
{
    ....
}
Reply
#7

Thanks ^^

Will remember that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)