HelpMe #10 [+REP]
#1

Sup guys, another question again, sry for spam..

How to make that when a player choose a option from a dialog, then another dialog shows up.

Like:

Dialog1 -> Dialog2 -> Dialog3


and just like that..
is it like this?:

pawn Код:
case 0:
                {
                    if(GetPlayerMoney(playerid) < 25) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
                    ShowPlayerDialog(playerid, 2, dialog1, "Some text here", "Option1\nOption2\nEtc", "Choose", "Cancel");
                        GivePlayerMoney(playerid, -25);
                }
Reply
#2

This is mean just edit it for yourself.

Код:
if(dialogid == TELE)
		{
		if(response == 1)
			{
			switch(listitem)
			{
				case 0:
				{
					ShowPlayerDialog(playerid,TUNES,DIALOG_STYLE_LIST,"Tuning Shops!","Transfender Los Santos \nTransfender Las Venturas \nWheel Arch Angels \nLoco Low Riders","Enter","Close");
				}
				case 1:
				{
					ShowPlayerDialog(playerid,LASA,DIALOG_STYLE_LIST,"Places Around San Andreas!","Los Santos \nLos Santos Airport \nSan Ferrio \nSan Ferrio Airport \nLas Venturas \nLas Venturas Airport","Enter","Close");
				}
				case 2:
				{
					ShowPlayerDialog(playerid,BJS,DIALOG_STYLE_LIST,"Big Jumps!","RichMans Jump \nSky Scrapper \nThe Strip \nUp, Up, Up, Shit Down!!!! \nCrane Jump \nMini Jump \nMarine Base Jump \nDesert Jump \nRiver Jump \nUp Up and Away","Enter","Close");
				}
                case 3:
				{
					ShowPlayerDialog(playerid,BASE,DIALOG_STYLE_LIST,"Base Jumps!","Base Jump One \nBase Jump Two \nBase Jump Three \nBase Jump Four \nBase Jump Five \nBase Jump Six \nBase Jump Seven \nBase Jump Eight \nBase Jump Nine","Enter","Close");
				}
                case 4:
				{
					ShowPlayerDialog(playerid,PARK,DIALOG_STYLE_LIST,"StuntParks!","Los Santos Airport \nSan Ferrio Airport \nLos Venturas Airport \nOld Airfield \nDisney StuntPark","Enter","Close");
				}
			}

		}
	}
Reply
#3

Yeah it is like that.... Thing is dont ask just try it helps you learn from mistakes

EDIT: At the poster above: YOu just repaeated his example...?
Reply
#4

Thanks!
Reply
#5

An example from Garsino.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1994) {
        if(response) {
            if(listitem == 0) {                   // Bikes
                ShowPlayerDialog(playerid, 1994+1, DIALOG_STYLE_LIST, "Bikes", "BF-400\nBike\nBMX\nHPV1000\nFaggio\nFCR-900\nFreeway\nMountain Bike\nNRG-500\nPCJ-600\nPizzaboy\nSanchez\nWayfarer\nQuad\nBack", "Select", "Cancel");
            }
            if(listitem == 1) {                   // Cars [A-E]
                new cMenuString[408];
                cMenuString = " ";
                strcat(cMenuString, "Admiral\nAlpha\nAmbulance\nBaggage\nBandito\nBanshee\nBarracks\nBenson\nBerkley's RC Van\nBF Injection\nBlade\nBlista Compact\nBloodring Banger\nBobcat\nBoxville 1\nBoxville 2\nBravura\nBroadway\nBuccaneer\nBuffalo\nBullet\nBurrito\nBus\nCabbie\n");
                strcat(cMenuString, "Caddy\nCadrona\nCamper\nCement Truck\nCheetah\nClover\nClub\nCoach\nCombine Harvester\nComet\nDFT-30\nDozer\nDumper\nDune(ride)\nElegant\nElegy\nEmperor\nEsperanto\nEuros\nBack");
                ShowPlayerDialog(playerid, 1994+2, DIALOG_STYLE_LIST, "Cars 1 [A-E]", cMenuString, "Select", "Cancel");
            }
            if(listitem == 2) {                   // Cars 2 [F-P]
                new cMenuString[408];
                cMenuString = " ";
                strcat(cMenuString, "FBI Rancher\nFBI Truck\nFeltzer\nFiretruck 1\nFiretruck 2\nFlash\nFlatbed\nForklift\nFortune\nGlendale 1\nGlendale 2\nGreenwood\nHermes\nHotdog\nHotknife\nHotring Racer 1\nHotring Racer 2\nHotring Racer 3\nHuntley\nHustler\nInfernus\nIntruder\nJester\nJourney\nKart\nLandstalker\nLinerunner\nMajestic\nManana\nMerit\nMesa\nMonster\nMonster A\nMonster B\nMoonbeam\nMower\nMr Whoopee\nMule\nNebula\n");
                strcat(cMenuString, "Newsvan\nOceanic\nPacker\nBack");
                ShowPlayerDialog(playerid, 1994+3, DIALOG_STYLE_LIST, "Cars 2 [F-P]", cMenuString, "Select", "Cancel");
            }
            if(listitem == 3) {                   // Cars 3 [P-S]
                ShowPlayerDialog(playerid, 1994+4, DIALOG_STYLE_LIST, "Cars 3 [P-S]", "Patriot\nPerenniel\nPetrol Tanker\nPhoenix\nPicador\nPolice Car (LSPD)\nPolice Car (SFPD)\nPolice Car (LVPD)\nPolice Ranger\nPolice Truck (Enforcer)\nPolice Truck (SWAT)\nPony\nPremier\nPrevion\nPrimo\nRancher\nRegina\nRemington\nRhino\nRoadtrain\nRomero\nRumpo\nSabre\nSadler 1\nSadler 2\nSandking\nSavanna\nSecuricar\nSentinel\nSlamvan\nSolair\nStafford\nStallion\nStratum\nStretch\nSultan\nSunrise\nBack", "Select", "Cancel");
            }
            if(listitem == 4) {                   // Cars 4 [S-Z]
                ShowPlayerDialog(playerid, 1994+5, DIALOG_STYLE_LIST, "Cars 4 [S-Z]", "Super GT\nSweeper\nTahoma\nTampa\nTaxi\nTornado\nTowtruck\nTractor\nTrashmaster\nTug\nTurismo\nUranus\nUtility Van\nVincent\nVirgo\nVoodoo\nWalton\nWashington\nWilliard\nWindsor\nYankee\nYosemite\nZR-350\nBack", "Select", "Cancel");
            }
            if(listitem == 5) {                   // Helicopters
                ShowPlayerDialog(playerid, 1994+6, DIALOG_STYLE_LIST, "Helicopters", "Cargobob\nHunter\nLeviathan\nMaverick\nPolice Maverick\nNews Chopper\nRaindance\nSparrow\nSea Sparrow\nBack", "Select", "Cancel");
            }
            if(listitem == 6) {                   // Planes
                ShowPlayerDialog(playerid, 1994+7, DIALOG_STYLE_LIST, "Planes", "Andromada\nAT-400\nBeagle\nCropduster\nDodo\nHydra\nNevada\nRustler\nShamal\nSkimmer\nStuntplane\nBack", "Select", "Cancel");
            }
            if(listitem == 7) {                   // Boats
                ShowPlayerDialog(playerid, 1994+8, DIALOG_STYLE_LIST, "Boats", "Coastguard\nDinghy\nJetmax\nLaunch\nMarquis\nPredator\nReefer\nSpeeder\nSquallo\nTropic\nBack", "Select", "Cancel");
            }
            if(listitem == 8) {                   // Trains
                ShowPlayerDialog(playerid, v+9, DIALOG_STYLE_LIST, "Trains", "Brown Streak\nFreight Box Trailer\nFreight Flat Trailer\nFreight\nStreak Trailer\nTram\nBack", "Select", "Cancel");
            }
            if(listitem == 9) {                   // Trailers
                ShowPlayerDialog(playerid, 1994+10, DIALOG_STYLE_LIST, "Trailers", "Article Trailer 1\nArticle Trailer 2\nArticle Trailer 3\nBaggage Trailer (A)\nBaggage Trailer (B)\nFarm Trailer\nPetrol Trailer\nTug Stairs Trailer\nUtility Trailer\nBack", "Select", "Cancel");
            }
            if(listitem == 10) {                  // RC Vehicles + Vortex
                ShowPlayerDialog(playerid, 1994+11, DIALOG_STYLE_LIST, "RC Vehicles + Vortex", "RC Bandit\nRC Cam\nRC Tiger\nRC Baron\nRC Goblin\nRC Raider\nVortex\nBack", "Select", "Cancel");
            }
        }
        return 1;
    }
//==============================================================================
//                                   Bikes
//==============================================================================
    if(dialogid == 1994+1) {                         // Bikes
        if(response) {
            if(listitem == 0) {                   // BF-400
                CreateVehicleEx(playerid,581, X,Y,Z+1, Angle, random(126), random(126), -1);
            }
            if(listitem == 1) {                   // Bike
                CreateVehicleEx(playerid,509, X,Y,Z+1, Angle, random(126), random(126), -1);
            }
            if(listitem == 2) {                   //  BMX
                CreateVehicleEx(playerid,481, X,Y,Z+1, Angle, random(126), random(126), -1);
            }
            if(listitem == 3) {                   //  HPV1000
                CreateVehicleEx(playerid,523, X,Y,Z+1, Angle, random(126), random(126), -1);
            }
            if(listitem == 4) {                   //  Faggio
                CreateVehicleEx(playerid,462, X,Y,Z+1, Angle, random(126), random(126), -1);
            }
            if(listitem == 5) {                   // FCR-900
                CreateVehicleEx(playerid,521, X,Y,Z+1, Angle, random(126), random(126), -1);
            }
            if(listitem == 6) {                   // Freeway
                CreateVehicleEx(playerid,463, X,Y,Z+1, Angle, random(126), random(126), -1);
            }
            if(listitem == 7) {                   // Mountain Bike
                CreateVehicleEx(playerid,510, X,Y,Z+1, Angle, random(126), random(126), -1);
            }
            if(listitem == 8) {                   // NRG-500
                CreateVehicleEx(playerid,522, X,Y,Z+1, Angle, random(126), random(126), -1);
            }
            if(listitem == 9) {                   // PCJ-600
                CreateVehicleEx(playerid,461, X,Y,Z+1, Angle, random(126), random(126), -1);
            }
            if(listitem == 10) {                  // Pizzaboy
                CreateVehicleEx(playerid,448, X,Y,Z+1, Angle, random(126), random(126), -1);
            }
            if(listitem == 11) {                  // Sanchez
                CreateVehicleEx(playerid,468, X,Y,Z+1, Angle, random(126), random(126), -1);
            }
            if(listitem == 12) {                  // Wayfarer
                CreateVehicleEx(playerid,586, X,Y,Z+1, Angle, random(126), random(126), -1);
            }
            if(listitem == 13) {                  // Quad
                CreateVehicleEx(playerid,471, X,Y,Z+1, Angle, random(126), random(126), -1);
            }
            if(listitem == 14) {                  // Back
                ShowPlayerDialog(playerid, 1994, DIALOG_STYLE_LIST, "Vehicle Selection Menu","Bikes\nCars 1 [A-E]\nCars 2 [F-P]\nCars 3 [P-S]\nCars 4 [S-Z]\nHelicopters\nPlanes\nBoats\nTrains\nTrailers\nRC Vehicles + Vortex", "Select", "Cancel");
            }

        }
        return 1;
    }
    // More Code
    if(dialogid == 1994+2) {
        if(response) {
            if(listitem == 0) {  
            // Rest
Reply
#6

Wow, ill use Kostas' code, it was awesome!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)