Need help with dialog
#1

Hello!
Any can help me i need some help with dialog in on dialog respone because in teles menu or in paintjob menu i select paint job 1 it send me in sfa lol
Code:
Код:
	//------------ Teles
	if (strcmp(cmdtext, "/teles", true)==0)
	{
	ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Server teleports", "{FF0000}Drift - {0D00FF}(Drift Teles)\n{FF0000}Fun {0D00FF}- (Fun Stuff)\n{FF0000}Jumps {0D00FF}- (Insane Vehicle Jumps)\n{FF0000}Stunts {0D00FF}- (Stunting Teleports)\n{FF0000}Tuning {0D00FF}- (Vehicle Tuning Teleports)\n{FF0000}Others {0D00FF}- (Others Stuff)", "Teleport", "Close");
    PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
    return 1;}

	//------------ Paint
	if (strcmp(cmdtext, "/paint", true)==0)
	{
	ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST, "Paintjob", "{FF0000}Paintjob 1\n{0D00FF}Paintjob 2\n{FF0000}Paintjob 3", "Paint", "Close");
	PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
 	return 1;}
	//------------ Cvc
    if (strcmp(cmdtext, "/cvc", true)==0)
	{
	ShowPlayerDialog(playerid, 9, DIALOG_STYLE_LIST, "Change Vehicles Color", "Black\nWhite\nDark Blue\nLight Blue\nGreen\nRed\nYellow\nPink", "Paint", "Close");
	PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
	    return 1;
	}
	//------------ Wheels
 	if (strcmp(cmdtext, "/wheels", true)==0)
	{
	ShowPlayerDialog(playerid, 10, DIALOG_STYLE_LIST, "Change Vehicles Wheels", "Style 1\nStyle 2\nStyle 3\nStyle 4\nStyle 5\nStyle 6", "Accept", "");
	PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
	    return 1;
	}
//=====================================================================================
        	public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
			{
				new car;
				car = GetPlayerVehicleID(playerid);

				if(dialogid == 5) // Teles
				{
					if(response)
					{
						if(listitem == 0) 
						{
						ShowPlayerDialog(playerid, 10, DIALOG_STYLE_LIST, "Drift teleports", "{0D00FF}Drift {FF0000}1\n{0D00FF}Drift {FF0000}2\n{0D00FF}Drift {FF0000}3\n{0D00FF}Drift {FF0000}4\n{0D00FF}Drift {FF0000}5\n{0D00FF}Drift {FF0000}6\n{0D00FF}Drift {FF0000}7\n{0D00FF}Drift {FF0000}8\n{0D00FF}Drift {FF0000}9\n{0D00FF}Drift {FF0000}10\n{0D00FF}Drift {FF0000}11\n{0D00FF}Drift {FF0000}12\n{0D00FF}Drift {FF0000}13", "Teleport", "Close");
						}
						if(listitem == 1) 
						{
						ShowPlayerDialog(playerid, 11, DIALOG_STYLE_LIST, "Fun teleports", "{0D00FF}Bombshop\n{FF0000}Crazydrags\n{0D00FF}Crazyfunny\n{FF0000}Deathbolow\n{0D00FF}Deathrun\n{FF0000}Parkour\n{0D00FF}Racetrack\n{FF0000}Rollercoaster\n{0D00FF}Sumo", "Teleport", "Close");
						}
						if(listitem == 2)
						{
						ShowPlayerDialog(playerid, 12, DIALOG_STYLE_LIST, "Jumps teleports", "{0D00FF}Jump {FF0000}1\n{0D00FF}Jump {FF0000}2\n{0D00FF}Jump {FF0000}3\n{0D00FF}Jump {FF0000}4\n{0D00FF}Jump {FF0000}5\n{FF0000}Killerjump\n{0D00FF}Deathjump", "Teleport", "Close");
						}
						if(listitem == 3) 
						{
						ShowPlayerDialog(playerid, 13, DIALOG_STYLE_LIST, "Stunts teleports", "{0D00FF}Stunt {FF0000}1\n{0D00FF}Stunt {FF0000}2\n{0D00FF}Stunt {FF0000}3\n{0D00FF}Stunt {FF0000}4\n{0D00FF}Stunt {FF0000}5\n{FF0000}Farmstunt\n{0D00FF}Ministunt {FF0000}1", "Teleport", "Close");
						}
						if(listitem == 4)
						{
						ShowPlayerDialog(playerid, 13, DIALOG_STYLE_LIST, "Tuning teleports", "{0D00FF}Tune {FF0000}1\n{0D00FF}Tune {FF0000}2\n{0D00FF}Tune {FF0000}3", "Teleport", "Close");
						}
						if(listitem == 5)
						{
						ShowPlayerDialog(playerid, 14, DIALOG_STYLE_LIST, "Others teleports", "{0D00FF}Home\n{FF0000}Truckstop\n{FF0000}Sf {0D00FF}- (San Fiero)\n{FF0000}Lv {0D00FF}- (Las Ventura)\n{FF0000}Ls {0D00FF}- (Los Santo)\n{FF0000}Sfa {0D00FF}- (San Fiero Airport)\n{FF0000}Lsa {0D00FF}- (Los Santo Airport)\n{FF0000}Lva {0D00FF}- (Las Ventura Airport)", "Teleport", "Close");
						}
					}
					return 1;}
					
 				if(dialogid == 5+1) // Drift
				{
					if(response)
					{
						if(listitem == 0)
						{
						OnPlayerCommandText(playerid, "/drift1");
						}
						if(listitem == 1)
						{
						OnPlayerCommandText(playerid, "/drift2");
						}
						if(listitem == 2)
						{
						OnPlayerCommandText(playerid, "/drift3");
						}
						if(listitem == 3)
						{
						OnPlayerCommandText(playerid, "/drift4");
						}
						if(listitem == 4)
						{
						OnPlayerCommandText(playerid, "/drift5");
						}
						if(listitem == 5)
						{
						OnPlayerCommandText(playerid, "/drift6");
						}
						if(listitem == 6)
						{
						OnPlayerCommandText(playerid, "/drift7");
						}
						if(listitem == 7)
						{
						OnPlayerCommandText(playerid, "/drift8");
						}
						if(listitem == 8)
						{
						OnPlayerCommandText(playerid, "/drift9");
						}
						if(listitem == 9)
						{
						OnPlayerCommandText(playerid, "/drift10");
						}
						if(listitem == 10)
						{
						OnPlayerCommandText(playerid, "/drift11");
						if(listitem == 11)
						{
						OnPlayerCommandText(playerid, "/drift12");
						}
						if(listitem == 12)
						{
						OnPlayerCommandText(playerid, "/drift13");
						}
					}
				}
				return 1;}

				if(dialogid == 5+2) // fun
				{
					if(response)
					{
						if(listitem == 0)
						{
						OnPlayerCommandText(playerid, "/bombshop");
						}
						if(listitem == 1)
						{
						OnPlayerCommandText(playerid, "/crazydrags");
						}
						if(listitem == 2)
						{
						OnPlayerCommandText(playerid, "/crazyfunny");
						}
						if(listitem == 3)
						{
						OnPlayerCommandText(playerid, "/deathbolow");
						}
						if(listitem == 4)
						{
						OnPlayerCommandText(playerid, "/deathrun");
						}
						if(listitem == 5)
						{
						OnPlayerCommandText(playerid, "/parkour");
						}
						if(listitem == 6)
						{
						OnPlayerCommandText(playerid, "/racetrack");
						}
						if(listitem == 7)
						{
						OnPlayerCommandText(playerid, "/rollercoaster");
						}
						if(listitem == 8)
						{
						OnPlayerCommandText(playerid, "/sumo");
					}
				}
				return 1;}
				
				if(dialogid == 5+3) // jumps
				{
					if(response)
					{
						if(listitem == 0)
						{
						OnPlayerCommandText(playerid, "/jump1");
						}
						if(listitem == 1)
						{
						OnPlayerCommandText(playerid, "/jump2");
						}
						if(listitem == 2)
						{
						OnPlayerCommandText(playerid, "/jump3");
						}
						if(listitem == 3)
						{
						OnPlayerCommandText(playerid, "/jump4");
						}
						if(listitem == 4)
						{
						OnPlayerCommandText(playerid, "/jump5");
						}
						if(listitem == 5)
						{
						OnPlayerCommandText(playerid, "/killerjump");
						}
						if(listitem == 6)
						{
						OnPlayerCommandText(playerid, "/deathjump");
					}
				}
				return 1;}

				if(dialogid == 5+4) // stunts
				{
					if(response)
					{
						if(listitem == 0)
						{
						OnPlayerCommandText(playerid, "/stunt1");
						}
						if(listitem == 1)
						{
						OnPlayerCommandText(playerid, "/stunt2");
						}
						if(listitem == 2)
						{
						OnPlayerCommandText(playerid, "/stunt3");
						}
						if(listitem == 3)
						{
						OnPlayerCommandText(playerid, "/stunt4");
						}
						if(listitem == 4)
						{
						OnPlayerCommandText(playerid, "/stunt5");
						}
						if(listitem == 5)
						{
						OnPlayerCommandText(playerid, "/farmstunt");
						}
						if(listitem == 6)
						{
						OnPlayerCommandText(playerid, "/ministunt1");
					}
				}
				return 1;}
				
				if(dialogid == 5+5) // tuning
				{
					if(response)
					{
						if(listitem == 0)
						{
						OnPlayerCommandText(playerid, "/tune1");
						}
						if(listitem == 1)
						{
						OnPlayerCommandText(playerid, "/tune2");
						}
						if(listitem == 2)
						{
						OnPlayerCommandText(playerid, "/tune3");
					}
				}
				return 1;}
				
				if(dialogid == 5+6) // other
				{
					if(response)
					{
						if(listitem == 0)
						{
						OnPlayerCommandText(playerid, "/home");
						}
						if(listitem == 1)
						{
						OnPlayerCommandText(playerid, "/truckstop");
						}
						if(listitem == 0)
						{
						OnPlayerCommandText(playerid, "/sf");
						}
						if(listitem == 2)
						{
						OnPlayerCommandText(playerid, "/lv");
						}
						if(listitem == 3)
						{
						OnPlayerCommandText(playerid, "/ls");
						}
                        if(listitem == 4)
						{
						OnPlayerCommandText(playerid, "/sfa");
						}
						if(listitem == 5)
						{
						OnPlayerCommandText(playerid, "/lva");
						}
						if(listitem == 6)
						{
						OnPlayerCommandText(playerid, "/lsa");
						
					}
				}
				return 1;}

				if(dialogid == 10) // Wheels
				{
					if(response)
					{
						if(listitem == 0) // Style 1
						{
						AddVehicleComponent(car,1084);
						}
						if(listitem == 1) // Style 2
						{
						AddVehicleComponent(car,1073);
						}
						if(listitem == 2) // Style 3
						{
						AddVehicleComponent(car,1075);
						}
						if(listitem == 3) // Style 4
						{
						AddVehicleComponent(car,1077);
						}
						if(listitem == 4) // Style 5
						{
						AddVehicleComponent(car,1079);
						}
						if(listitem == 5) // Style 6
						{
						AddVehicleComponent(car,1080);
						}
					}
					return 1;}

				if(dialogid == 9) // Colors
				{
					if(response)
					{
						if(listitem == 0) // Black
						{
						ChangeVehicleColor(car,0,0);
						}
						if(listitem == 1) // White
						{
						ChangeVehicleColor(car,1,1);
						}
						if(listitem == 2) // Dark Blue
						{
						ChangeVehicleColor(car,425,425);
						}
						if(listitem == 3) // Light Blue
						{
						ChangeVehicleColor(car,2,2);
						}
						if(listitem == 4) // Green
						{
						ChangeVehicleColor(car,16,16);
						}
						if(listitem == 5) // Red
						{
						ChangeVehicleColor(car,3,3);
						}
						if(listitem == 6) // Yellow
						{
						ChangeVehicleColor(car,6,6);
						}
						if(listitem == 7) // Pink
						{
						ChangeVehicleColor(car,146,146);
						}
					}
					return 1;}

				if(dialogid == 8) // Paintjobs
				{
					if(response)
					{
						if(listitem == 0) // Style 1
						{
						ChangeVehiclePaintjob(car,0);
						}
						if(listitem == 1) // Style 2
						{
						ChangeVehiclePaintjob(car,1);
						}
						if(listitem == 2) // Style 3
						{
						ChangeVehiclePaintjob(car,2);
						}
					}

		return 1;}
return 0;}
Thanks!
Reply
#2

Does this even work?

pawn Код:
if(listitem == 3)
{
    OnPlayerCommandText(playerid, "/jump4");
}
Reply
#3

no
Reply
#4

any help?
Reply
#5

Well thought so, you should set a pos instead of calling something that doesn't exist.
Reply
#6

Thanks but i fix bug in tele it was in dialog id but now not work paint cvc (Change vehicles color)
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)