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