dialog menu
#1

hello i made a car spawn menu and it works fine.

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	GetPlayerPos(playerid, X, Y, Z);
	GetPlayerFacingAngle(playerid, Angle);
	pInt = GetPlayerInterior(playerid);
	
	if(dialogid == carmenu1)
	{
	    if(response)
	    {
	        if(listitem == 0)   // Admiral
	        {
	            CreateVehicle(445, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
	            SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Admiral, look around as you don't see the car!");
			}
			if(listitem == 1)   // Alpha
			{
			    CreateVehicle(602, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Alpha, look around as you don't see the car!");
			}
			if(listitem == 2)   // Baggage
			{
			    CreateVehicle(485, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Baggage, look around as you don't see the car!");
			}
			if(listitem == 3)   // Bandito
			{
			    CreateVehicle(568, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Bandito, look around as you don't see the car!");
			}
			if(listitem == 4)   // Banshee
			{
			    CreateVehicle(429, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Banshee, look around as you don't see the car!");
			}
			if(listitem == 5)   // Damaged Glendale
			{
			    CreateVehicle(604, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Damaged Glendale, look around as you don't see the car!");
			}
			if(listitem == 6)   // Damaged Sadle
			{
			    CreateVehicle(605, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Damaged Sadle, look around as you don't see the car!");
			}
			if(listitem == 7)   // BF Injection
			{
			    CreateVehicle(424, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a BF Injection, look around as you don't see the car!");
			}
			if(listitem == 8)   // Blade
			{
			    CreateVehicle(536, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Blade, look around as you don't see the car!");
			}
			if(listitem == 9)   // Blista Compact
			{
			    CreateVehicle(496, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Blista Compact, look around as you don't see the car!");
			}
			if(listitem == 10)  // Bloodring Banger
			{
			    CreateVehicle(504, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Bloodring Banger, look around as you don't see the car!");
			}
			if(listitem == 11)  //Bobcat
			{
			    CreateVehicle(422, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Bobcat, look around as you don't see the car!");
			}
			if(listitem == 12)  // Bravura
			{
			    CreateVehicle(401, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Bravura, look around as you don't see the car!");
			}
			if(listitem == 13)  // Broadway
			{
			    CreateVehicle(575, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Broadway, look around as you don't see the car!");
			}
			if(listitem == 14)  // Buccaneer
			{
			    CreateVehicle(518, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Buccaneer, look around as you don't see the car!");
			}
			if(listitem == 15)  // Buffalo
			{
			    CreateVehicle(402, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Buffalo, look around as you don't see the car!");
			}
			if(listitem == 16)  // Bullet
			{
				CreateVehicle(541, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
				SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Bullet, look around as you don't see the car!");
			}
			if(listitem == 17)  // Caddy
			{
			    CreateVehicle(457, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Caddy, look around as you don't see the car!");
			}
			if(listitem == 18)  // Cadrona
			{
			    CreateVehicle(527, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Cadrona, look around as you don't see the car!");
			}
			if(listitem == 19)  // Camper
			{
			    CreateVehicle(483, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Camper, look around as you don't see the car!");
			}
			if(listitem == 20)  // Cheetah
			{
			    CreateVehicle(415, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
                SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Cheetah, look around as you don't see the car!");
			}
			if(listitem == 21)  // Clover
			{
			    CreateVehicle(542, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Clover, look around as you don't see the car!");
			}
			if(listitem == 22)  // Club
			{
			    CreateVehicle(589, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Club, look around as you don't see the car!");
			}
			if(listitem == 23)  // Comet
			{
			    CreateVehicle(480, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Comet, look around as you don't see the car!");
			}
			if(listitem == 24)  // Elegant
			{
			    CreateVehicle(507, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Elegant, look around as you don't see the car!");
			}
			if(listitem == 25)  // Elegy
			{
			    CreateVehicle(562, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Elegy, look around as you don't see the car!");
			}
			if(listitem == 26)  // Emperor
			{
			    CreateVehicle(585, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Emperor, look around as you don't see the car!");
			}
			if(listitem == 27)  // Esperanto
			{
				CreateVehicle(419, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
				SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Esperanto, look around as you don't see the car!");
			}
			if(listitem == 28)  // Euros
			{
			    CreateVehicle(587, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Euros, look around as you don't see the car!");
			}
			if(listitem == 29)  // Feltzer
			{
			    CreateVehicle(533, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Feltzer, look around as you don't see the car!");
			}
			if(listitem == 30)  // Flash
			{
			    CreateVehicle(565, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Flash, look around as you don't see the car!");
			}
			if(listitem == 31)  // Fortune
			{
			    CreateVehicle(526, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Fortune, look around as you don't see the car!");
			}
		}
		return 1;
but as i make a second menu.

Код:
	}
	GetPlayerPos(playerid, X, Y, Z);
	GetPlayerFacingAngle(playerid, Angle);
	pInt = GetPlayerInterior(playerid);

	if(dialogid == carmenu2)
	{
	    if(response)
	    {
	        if(listitem == 32)   // Glendale
	        {
	            CreateVehicle(466, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
	            SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Glendale, look around as you don't see the car!");
			}
			if(listitem == 1)   // Greenwood
			{
			    CreateVehicle(492, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Greenwood, look around as you don't see the car!");
			}
			if(listitem == 2)   // Hermes
			{
			    CreateVehicle(474, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Hermes, look around as you don't see the car!");
			}
			if(listitem == 3)   // Hotknife
			{
			    CreateVehicle(434, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Hotknife, look around as you don't see the car!");
			}
			if(listitem == 4)   // Hotring Racer
			{
			    CreateVehicle(502, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Hotring Racer, look around as you don't see the car!");
			}
			if(listitem == 5)   // Huntley
			{
			    CreateVehicle(579, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Huntley, look around as you don't see the car!");
			}
			if(listitem == 6)   // Hustler
			{
			    CreateVehicle(545, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Hustler, look around as you don't see the car!");
			}
			if(listitem == 7)   // Infernus
			{
			    CreateVehicle(411, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Infernus, look around as you don't see the car!");
			}
			if(listitem == 8)   // Intruder
			{
			    CreateVehicle(546, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Intruder, look around as you don't see the car!");
			}
			if(listitem == 9)   // Jester
			{
			    CreateVehicle(559, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Jester, look around as you don't see the car!");
			}
			if(listitem == 10)  // Kart
			{
			    CreateVehicle(571, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Kart, look around as you don't see the car!");
			}
			if(listitem == 11)  // Bulletfree Walton
			{
			    CreateVehicle(478, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Bulletfree Walton, look around as you don't see the car!");
			}
			if(listitem == 12)  // Landstalker
			{
			    CreateVehicle(400, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Landstalker, look around as you don't see the car!");
			}
			if(listitem == 13)  // Rancher
			{
			    CreateVehicle(489, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Rancher, look around as you don't see the car!");
			}
			if(listitem == 14)  // Majestic
			{
			    CreateVehicle(517, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Majestic, look around as you don't see the car!");
			}
			if(listitem == 15)  // Manana
			{
			    CreateVehicle(410, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Manana, look around as you don't see the car!");
			}
			if(listitem == 16)  // Merit
			{
				CreateVehicle(551, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
				SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Merit, look around as you don't see the car!");
			}
			if(listitem == 17)  // Mesa
			{
			    CreateVehicle(500, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Mesa, look around as you don't see the car!");
			}
			if(listitem == 18)  // Monster
			{
			    CreateVehicle(444, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Monster, look around as you don't see the car!");
			}
			if(listitem == 19)  // Monster A
			{
			    CreateVehicle(556, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Monster A, look around as you don't see the car!");
			}
			if(listitem == 20)  // Monster B
			{
			    CreateVehicle(557, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
                SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Monster B, look around as you don't see the car!");
			}
			if(listitem == 21)  // Nebula
			{
			    CreateVehicle(516, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Nebula, look around as you don't see the car!");
			}
			if(listitem == 22)  // Oceanic
			{
			    CreateVehicle(467, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Oceanic, look around as you don't see the car!");
			}
			if(listitem == 23)  // Perennial
			{
			    CreateVehicle(404, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Perennial, look around as you don't see the car!");
			}
			if(listitem == 24)  // Phoenix
			{
			    CreateVehicle(603, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Phoenix, look around as you don't see the car!");
			}
			if(listitem == 25)  // Picador
			{
			    CreateVehicle(600, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Picador, look around as you don't see the car!");
			}
			if(listitem == 26)  // Premier
			{
			    CreateVehicle(426, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Premier, look around as you don't see the car!");
			}
			if(listitem == 27)  // Previon
			{
				CreateVehicle(436, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
				SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Previon, look around as you don't see the car!");
			}
			if(listitem == 28)  // Primo
			{
			    CreateVehicle(547, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Primo, look around as you don't see the car!");
			}
			if(listitem == 29)  // Regina
			{
			    CreateVehicle(479, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Regina, look around as you don't see the car!");
			}
			if(listitem == 30)  // Remmington
			{
			    CreateVehicle(534, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Remmington, look around as you don't see the car!");
			}
			if(listitem == 31)  // Romero
			{
			    CreateVehicle(442, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Romero, look around as you don't see the car!");
			}
		}
		return 1;
	}
	return 0;
}
then it looks like this:

Код:
{
	GetPlayerPos(playerid, X, Y, Z);
	GetPlayerFacingAngle(playerid, Angle);
	pInt = GetPlayerInterior(playerid);
	
	if(dialogid == carmenu1)
	{
	    if(response)
	    {
	        if(listitem == 0)   // Admiral
	        {
	            CreateVehicle(445, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
	            SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Admiral, look around as you don't see the car!");
			}
			if(listitem == 1)   // Alpha
			{
			    CreateVehicle(602, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Alpha, look around as you don't see the car!");
			}
			if(listitem == 2)   // Baggage
			{
			    CreateVehicle(485, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Baggage, look around as you don't see the car!");
			}
			if(listitem == 3)   // Bandito
			{
			    CreateVehicle(568, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Bandito, look around as you don't see the car!");
			}
			if(listitem == 4)   // Banshee
			{
			    CreateVehicle(429, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Banshee, look around as you don't see the car!");
			}
			if(listitem == 5)   // Damaged Glendale
			{
			    CreateVehicle(604, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Damaged Glendale, look around as you don't see the car!");
			}
			if(listitem == 6)   // Damaged Sadle
			{
			    CreateVehicle(605, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Damaged Sadle, look around as you don't see the car!");
			}
			if(listitem == 7)   // BF Injection
			{
			    CreateVehicle(424, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a BF Injection, look around as you don't see the car!");
			}
			if(listitem == 8)   // Blade
			{
			    CreateVehicle(536, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Blade, look around as you don't see the car!");
			}
			if(listitem == 9)   // Blista Compact
			{
			    CreateVehicle(496, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Blista Compact, look around as you don't see the car!");
			}
			if(listitem == 10)  // Bloodring Banger
			{
			    CreateVehicle(504, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Bloodring Banger, look around as you don't see the car!");
			}
			if(listitem == 11)  //Bobcat
			{
			    CreateVehicle(422, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Bobcat, look around as you don't see the car!");
			}
			if(listitem == 12)  // Bravura
			{
			    CreateVehicle(401, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Bravura, look around as you don't see the car!");
			}
			if(listitem == 13)  // Broadway
			{
			    CreateVehicle(575, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Broadway, look around as you don't see the car!");
			}
			if(listitem == 14)  // Buccaneer
			{
			    CreateVehicle(518, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Buccaneer, look around as you don't see the car!");
			}
			if(listitem == 15)  // Buffalo
			{
			    CreateVehicle(402, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Buffalo, look around as you don't see the car!");
			}
			if(listitem == 16)  // Bullet
			{
				CreateVehicle(541, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
				SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Bullet, look around as you don't see the car!");
			}
			if(listitem == 17)  // Caddy
			{
			    CreateVehicle(457, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Caddy, look around as you don't see the car!");
			}
			if(listitem == 18)  // Cadrona
			{
			    CreateVehicle(527, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Cadrona, look around as you don't see the car!");
			}
			if(listitem == 19)  // Camper
			{
			    CreateVehicle(483, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Camper, look around as you don't see the car!");
			}
			if(listitem == 20)  // Cheetah
			{
			    CreateVehicle(415, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
                SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Cheetah, look around as you don't see the car!");
			}
			if(listitem == 21)  // Clover
			{
			    CreateVehicle(542, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Clover, look around as you don't see the car!");
			}
			if(listitem == 22)  // Club
			{
			    CreateVehicle(589, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Club, look around as you don't see the car!");
			}
			if(listitem == 23)  // Comet
			{
			    CreateVehicle(480, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Comet, look around as you don't see the car!");
			}
			if(listitem == 24)  // Elegant
			{
			    CreateVehicle(507, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Elegant, look around as you don't see the car!");
			}
			if(listitem == 25)  // Elegy
			{
			    CreateVehicle(562, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Elegy, look around as you don't see the car!");
			}
			if(listitem == 26)  // Emperor
			{
			    CreateVehicle(585, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Emperor, look around as you don't see the car!");
			}
			if(listitem == 27)  // Esperanto
			{
				CreateVehicle(419, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
				SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Esperanto, look around as you don't see the car!");
			}
			if(listitem == 28)  // Euros
			{
			    CreateVehicle(587, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Euros, look around as you don't see the car!");
			}
			if(listitem == 29)  // Feltzer
			{
			    CreateVehicle(533, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Feltzer, look around as you don't see the car!");
			}
			if(listitem == 30)  // Flash
			{
			    CreateVehicle(565, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Flash, look around as you don't see the car!");
			}
			if(listitem == 31)  // Fortune
			{
			    CreateVehicle(526, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Fortune, look around as you don't see the car!");
			}
		}
		return 1;
	}
	GetPlayerPos(playerid, X, Y, Z);
	GetPlayerFacingAngle(playerid, Angle);
	pInt = GetPlayerInterior(playerid);

	if(dialogid == carmenu2)
	{
	    if(response)
	    {
	        if(listitem == 32)   // Glendale
	        {
	            CreateVehicle(466, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
	            SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Glendale, look around as you don't see the car!");
			}
			if(listitem == 1)   // Greenwood
			{
			    CreateVehicle(492, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Greenwood, look around as you don't see the car!");
			}
			if(listitem == 2)   // Hermes
			{
			    CreateVehicle(474, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Hermes, look around as you don't see the car!");
			}
			if(listitem == 3)   // Hotknife
			{
			    CreateVehicle(434, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Hotknife, look around as you don't see the car!");
			}
			if(listitem == 4)   // Hotring Racer
			{
			    CreateVehicle(502, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Hotring Racer, look around as you don't see the car!");
			}
			if(listitem == 5)   // Huntley
			{
			    CreateVehicle(579, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Huntley, look around as you don't see the car!");
			}
			if(listitem == 6)   // Hustler
			{
			    CreateVehicle(545, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Hustler, look around as you don't see the car!");
			}
			if(listitem == 7)   // Infernus
			{
			    CreateVehicle(411, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Infernus, look around as you don't see the car!");
			}
			if(listitem == 8)   // Intruder
			{
			    CreateVehicle(546, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Intruder, look around as you don't see the car!");
			}
			if(listitem == 9)   // Jester
			{
			    CreateVehicle(559, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Jester, look around as you don't see the car!");
			}
			if(listitem == 10)  // Kart
			{
			    CreateVehicle(571, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Kart, look around as you don't see the car!");
			}
			if(listitem == 11)  // Bulletfree Walton
			{
			    CreateVehicle(478, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Bulletfree Walton, look around as you don't see the car!");
			}
			if(listitem == 12)  // Landstalker
			{
			    CreateVehicle(400, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Landstalker, look around as you don't see the car!");
			}
			if(listitem == 13)  // Rancher
			{
			    CreateVehicle(489, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Rancher, look around as you don't see the car!");
			}
			if(listitem == 14)  // Majestic
			{
			    CreateVehicle(517, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Majestic, look around as you don't see the car!");
			}
			if(listitem == 15)  // Manana
			{
			    CreateVehicle(410, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Manana, look around as you don't see the car!");
			}
			if(listitem == 16)  // Merit
			{
				CreateVehicle(551, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
				SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Merit, look around as you don't see the car!");
			}
			if(listitem == 17)  // Mesa
			{
			    CreateVehicle(500, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Mesa, look around as you don't see the car!");
			}
			if(listitem == 18)  // Monster
			{
			    CreateVehicle(444, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Monster, look around as you don't see the car!");
			}
			if(listitem == 19)  // Monster A
			{
			    CreateVehicle(556, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Monster A, look around as you don't see the car!");
			}
			if(listitem == 20)  // Monster B
			{
			    CreateVehicle(557, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
                SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Monster B, look around as you don't see the car!");
			}
			if(listitem == 21)  // Nebula
			{
			    CreateVehicle(516, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Nebula, look around as you don't see the car!");
			}
			if(listitem == 22)  // Oceanic
			{
			    CreateVehicle(467, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Oceanic, look around as you don't see the car!");
			}
			if(listitem == 23)  // Perennial
			{
			    CreateVehicle(404, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Perennial, look around as you don't see the car!");
			}
			if(listitem == 24)  // Phoenix
			{
			    CreateVehicle(603, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Phoenix, look around as you don't see the car!");
			}
			if(listitem == 25)  // Picador
			{
			    CreateVehicle(600, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Picador, look around as you don't see the car!");
			}
			if(listitem == 26)  // Premier
			{
			    CreateVehicle(426, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Premier, look around as you don't see the car!");
			}
			if(listitem == 27)  // Previon
			{
				CreateVehicle(436, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
				SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Previon, look around as you don't see the car!");
			}
			if(listitem == 28)  // Primo
			{
			    CreateVehicle(547, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Primo, look around as you don't see the car!");
			}
			if(listitem == 29)  // Regina
			{
			    CreateVehicle(479, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Regina, look around as you don't see the car!");
			}
			if(listitem == 30)  // Remmington
			{
			    CreateVehicle(534, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Remmington, look around as you don't see the car!");
			}
			if(listitem == 31)  // Romero
			{
			    CreateVehicle(442, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
			    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Romero, look around as you don't see the car!");
			}
		}
		return 1;
	}
	return 0;
}
but as i use the second dialog menu and i want to spawn a Glendale there comes an Admiral from the first dialog menu.
and i made already a carmenu3 command and as i click the first it spawns an admiral from menu 1 and i didnґt create carmenu 3 on DialogResponse yet.
please help me!!!!

i'm a noob in pawno scripting.
Reply
#2

Dialog ID are in conflict!

Change IDs
Reply
#3

Quote:
Originally Posted by Zh3r0
Посмотреть сообщение
Dialog ID are in conflict!

Change IDs
nope doesnґt work i renamed the second menu vehicle2 and as i spawn an infernus i get a blade from the first menu.
Reply
#4

Have you defined the menu's? ie,
pawn Код:
#define carmenu1    200
#define carmenu2    201
Try putting that at the top of your script (if you dont already have something simalar).
Reply
#5

why do you if(listitem == 32), shouldn't it be if(listitem == 0) ?
and show us the carmenu defines, because your dialogs might be conflicting with the same dialog id's
Reply
#6

Heres a better way of doing dialogs (more clear at least)
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, Angle);
    pInt = GetPlayerInterior(playerid);

    if(dialogid == carmenu1)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {   // Admiral
                    CreateVehicle(445, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
                    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Admiral, look around as you don't see the car!");
                }
                case 1:
                {   // Alpha
                    CreateVehicle(602, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
                    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Alpha, look around as you don't see the car!");
                }
                case 2:   // Baggage
                {
                    CreateVehicle(485, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
                    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Baggage, look around as you don't see the car!");
                }
                case 3:   // Bandito
                {
                    CreateVehicle(568, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
                    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Bandito, look around as you don't see the car!");
                }
                case 4:   // Banshee
                {
                    CreateVehicle(429, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
                    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Banshee, look around as you don't see the car!");
                }
                case 5:   // Damaged Glendale
                {
                    CreateVehicle(604, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
                    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Damaged Glendale, look around as you don't see the car!");
                }
                case 6:
                {
                    //and so on
                }
            }
        }
        else SendClientMessage(playerid,0xff0000FF,"Cancelled");
    }
    //other dialogs here
    return 1;
}
Reply
#7

@iggy1
i tried that already but it doesn't work

@armyoftwo
i know i changed it cause i thinked* that was the problem. in my script it is already changed to listitem == 0.

*srry for bad english, it's cause i'm dutch.
Reply
#8

Код:
#undef carmenu1
#undef carmenu2
#define carmenu1    1337
#define carmenu2    1338
try putting that DialogResponse callback
Reply
#9

return '1' instead of '0' try that.
Reply
#10

Quote:
Originally Posted by iggy1
Посмотреть сообщение
Heres a better way of doing dialogs (more clear at least)
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, Angle);
    pInt = GetPlayerInterior(playerid);

    if(dialogid == carmenu1)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {   // Admiral
                    CreateVehicle(445, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
                    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Admiral, look around as you don't see the car!");
                }
                case 1:
                {   // Alpha
                    CreateVehicle(602, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
                    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned an Alpha, look around as you don't see the car!");
                }
                case 2:   // Baggage
                {
                    CreateVehicle(485, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
                    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Baggage, look around as you don't see the car!");
                }
                case 3:   // Bandito
                {
                    CreateVehicle(568, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
                    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Bandito, look around as you don't see the car!");
                }
                case 4:   // Banshee
                {
                    CreateVehicle(429, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
                    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Banshee, look around as you don't see the car!");
                }
                case 5:   // Damaged Glendale
                {
                    CreateVehicle(604, X+5, Y, Z, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
                    SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a Damaged Glendale, look around as you don't see the car!");
                }
                case 6:
                {
                    //and so on
                }
            }
        }
        else SendClientMessage(playerid,0xff0000FF,"Cancelled");
    }
    //other dialogs here
    return 1;
}
i tried but i got this errors

[error]C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1079 -- 1080) : error 029: invalid expression, assumed zero
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1084 -- 1085) : error 029: invalid expression, assumed zero
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1095) : error 021: symbol already defined: "GetPlayerPos"
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(109 : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1100) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1102) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1104) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1109) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1114) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1119) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1124) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1129) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1134) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1139) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1144) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1149) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1154) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1159) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1164) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1169) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1174) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1179) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1184) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1189) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1194) : error 010: invalid function or declaration
C:\Documents and Settings\admin\Bureaublad\sa-mp server\gamemodes\secure.pwn(1199) : error 010: invalid function or declaration[/error]
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)