Рекомендованные сообщения



4 posts in this topic

Доброго времени суток уважаемые участники PAWNO!

Я нашел баг на сервере который не могу исправить и поэтому обращаюсь к вам.

Проблема в том что при нажатии кнопки "Выход" текстдрав уходит а игрок остается в СТО.

Помогите пожалуйста. Заранее спасибо!

Share this post


Link to post
Share on other sites

@Дарвин, найдите код, связанный с выходом из здания СТО, и покажите его здесь.

Share this post


Link to post
Share on other sites

@odosenok

Спойлер

cmd:fixcar(playerid,params[])
{
	new cares[MAX_PLAYERS] = 0;
	new totalstring[220];
	if(sscanf(params,"d",params[0])) return SendClientMessage(playerid,COLOR_ORANGE,"Èñïîëüçóéòå: /fixcar [1/2]");
	if(params[0] == 1)
	{
		if(PI[playerid][PlayerCarID][0] != INVALID_VEHICLE_ID) cares[playerid]++;
		if(cares[playerid] <= 0) return SendClientMessage(playerid,COLOR_DARKORANGE,"Ó Âàñ íåò òðàíñïîðòà");
		if(PI[playerid][cModel][0] > 0)
		{
			if(PI[playerid][cPaintjob][0] > 3 || PI[playerid][cPaintjob][0] < 0) PI[playerid][cPaintjob][0] = 3;
			if(PI[playerid][PlayerCarID][0] != INVALID_VEHICLE_ID)
			{
				DestroyVehicle(PI[playerid][PlayerCarID][0]);
				PI[playerid][PlayerCarID][0] = INVALID_VEHICLE_ID;
			}
			if(GetPlayerGarage(playerid))
			{
				new id = GetPVarInt(playerid,"PlayerGarage");
				PI[playerid][PlayerCarID][0] = CreateVehicle(PI[playerid][cModel][0], GarageInfo[id][gCar][0], GarageInfo[id][gCar][1], GarageInfo[id][gCar][2], GarageInfo[id][gCar][3], PI[playerid][cColor][0], PI[playerid][cColor][1], 90000);
			}
			else
			{
			if(PI[playerid][cX][0] == 0 && PI[playerid][cY][0] == 0 && PI[playerid][cZ][0] == 0)
			{
			    new r = random(44);
			    PI[playerid][PlayerCarID][0] = CreateVehicle(PI[playerid][cModel][0], SalonRandSpawn[r][0], SalonRandSpawn[r][1], SalonRandSpawn[r][2], SalonRandSpawn[r][3], PI[playerid][cColor][0], PI[playerid][cColor][1], 90000);
			    ShowPlayerDialog(playerid, D_NULL, 0, "{"#cSV"}Àâòîñàëîí", "{FFFFFF}Âû íå ïðèïàðêîâàëè âàø àâòîìîáèëü #1 ïåðåä âûõîäîì.\n\
				{FFFFFF}Çàáðàòü âàø àâòîìîáèëü âû ìîæåòå íà ïàðêîâêå àâòîñàëîíà {"#cSV"}''Àíàøàí''.\n\
				{FF0000}Ïîñòàðàéòåñü íå çàáûòü ïðèïàðêîâàòü âàø àâòîìîáèëü â ýòîò ðàç.", "Çàêðûòü", "");
			}
			else
			{
			    PI[playerid][PlayerCarID][0] = CreateVehicle(PI[playerid][cModel][0], PI[playerid][cX][0],PI[playerid][cY][0],PI[playerid][cZ][0],PI[playerid][cA][0], PI[playerid][cColor][0], PI[playerid][cColor][1], 90000);
			}
			}
			CarDoors(PI[playerid][PlayerCarID][0], PI[playerid][cLock][0]);
			Fuel[PI[playerid][PlayerCarID][0]] = PI[playerid][cFuel][0];
			SetVehicleHealth(PI[playerid][PlayerCarID][0], 1000);
			Engine[PI[playerid][PlayerCarID][0]] = Lights[PI[playerid][PlayerCarID][0]] = false;
			IsLocked[PI[playerid][PlayerCarID][0]] = (!PI[playerid][cLock][0]) ? (false) : (true);
			for(new i; i < 14; i++)
			{
			    if(PI[playerid][cVehcoms][i]) AddVehicleComponent(PI[playerid][PlayerCarID][0], PI[playerid][cVehcoms][i]);
			}
			if(PI[playerid][cPaintjob][0] != 3) ChangeVehiclePaintjob(PI[playerid][PlayerCarID][0], PI[playerid][cPaintjob]);
	        if(Settings[playerid][5] == 1)
	        {
				//----------------------------[ Ñèñòåìêà 3D íîìåðîâ]-------------------
				if(VehicleLabel[PI[playerid][PlayerCarID][0]] != Text3D:INVALID_3DTEXT_ID)
				{
				    DestroyDynamic3DTextLabel(VehicleLabel[PI[playerid][PlayerCarID][0]]);
				    VehicleLabel[PI[playerid][PlayerCarID][0]] = Text3D:INVALID_3DTEXT_ID;
				}
				if(strcmp(PI[playerid][pNumberVehicle],"None",true,64) != 0)
				{
					format(totalstring,220,"%s",PI[playerid][pNumberVehicle]);
					VehicleLabel[PI[playerid][PlayerCarID][0]] = CreateDynamic3DTextLabel(totalstring, 0xFFFFFFFF, 0, 0, 0, 10.0,INVALID_PLAYER_ID, PI[playerid][PlayerCarID][0], 1);
				}
				else
				{
				    VehicleLabel[PI[playerid][PlayerCarID][0]] = CreateDynamic3DTextLabel("[ ÒÐÀÍÇÈÒ ]", 0xFFFFFFFF, 0, 0, 0, 10.0,INVALID_PLAYER_ID, PI[playerid][PlayerCarID][0], 1);
				}
			}
			SetVehicleNumberPlate(PI[playerid][PlayerCarID][0], PI[playerid][pNumberVehicle]);
		}
		SendClientMessage(playerid,COLOR_BLUE,"Òðàíñïîðò {FFCC00}¹1 {1D99D4}äîñòàâëåí ê ìåñòó ïàðêîâêè.");
	}
	else if(params[0] == 2)
	{
		if(PI[playerid][PlayerCarID][1] != INVALID_VEHICLE_ID) cares[playerid]++;
		if(cares[playerid] <= 0) return SendClientMessage(playerid,COLOR_DARKORANGE,"Ó Âàñ íåò òðàíñïîðòà");
		if(PI[playerid][cModel][1] > 0)
		{
			if(PI[playerid][cPaintjob][1] > 3 || PI[playerid][cPaintjob][1] < 0) PI[playerid][cPaintjob][1] = 3;
			if(PI[playerid][PlayerCarID][1] != INVALID_VEHICLE_ID)
			{
				DestroyVehicle(PI[playerid][PlayerCarID][1]);
				PI[playerid][PlayerCarID][1] = INVALID_VEHICLE_ID;
			}
			if(GetPlayerGarage(playerid))
			{
				new id = GetPVarInt(playerid,"PlayerGarage");
				PI[playerid][PlayerCarID][1] = CreateVehicle(PI[playerid][cModel][1], GarageInfo[id][gCar][0], GarageInfo[id][gCar][1], GarageInfo[id][gCar][2], GarageInfo[id][gCar][3], PI[playerid][cColor1][0], PI[playerid][cColor1][1], 90000);
			}
    		else
    		{
				if(PI[playerid][cX][1] == 0 && PI[playerid][cY][1] == 0 && PI[playerid][cZ][1] == 0)
				{
				    new r = random(44);
				    PI[playerid][PlayerCarID][1] = CreateVehicle(PI[playerid][cModel][1], SalonRandSpawn[r][0], SalonRandSpawn[r][1], SalonRandSpawn[r][2], SalonRandSpawn[r][3], PI[playerid][cColor1][0], PI[playerid][cColor1][1], 90000);
				    ShowPlayerDialog(playerid, D_NULL, 0, "{"#cSV"}Àâòîñàëîí", "{FFFFFF}Âû íå ïðèïàðêîâàëè âàø àâòîìîáèëü #2 ïåðåä âûõîäîì.\n\
					{FFFFFF}Çàáðàòü âàø àâòîìîáèëü âû ìîæåòå íà ïàðêîâêå àâòîñàëîíà {"#cSV"}''Àíàøàí''.\n\
					{FF0000}Ïîñòàðàéòåñü íå çàáûòü ïðèïàðêîâàòü âàø àâòîìîáèëü â ýòîò ðàç.", "Çàêðûòü", "");
				}
				else
				{
				    PI[playerid][PlayerCarID][1] = CreateVehicle(PI[playerid][cModel][1], PI[playerid][cX][1],PI[playerid][cY][1],PI[playerid][cZ][1],PI[playerid][cA][1], PI[playerid][cColor1][0], PI[playerid][cColor1][1], 90000);
				}
			}
			CarDoors(PI[playerid][PlayerCarID][1], PI[playerid][cLock][1]);
			Fuel[PI[playerid][PlayerCarID][1]] = PI[playerid][cFuel][1];
			SetVehicleHealth(PI[playerid][PlayerCarID][1], 1000);
			Engine[PI[playerid][PlayerCarID][1]] = Lights[PI[playerid][PlayerCarID][1]] = false;
			IsLocked[PI[playerid][PlayerCarID][1]] = (!PI[playerid][cLock][1]) ? (false) : (true);
			for(new i; i < 14; i++)
			{
			    if(PI[playerid][cVehcoms1][i]) AddVehicleComponent(PI[playerid][PlayerCarID][1], PI[playerid][cVehcoms1][i]);
			}
			if(PI[playerid][cPaintjob][1] != 3) ChangeVehiclePaintjob(PI[playerid][PlayerCarID][1], PI[playerid][cPaintjob][1]);
	        if(Settings[playerid][5] == 1)
	        {
				//----------------------------[ Ñèñòåìêà 3D íîìåðîâ]-------------------
				if(VehicleLabel[PI[playerid][PlayerCarID][1]] != Text3D:INVALID_3DTEXT_ID)
				{
				    DestroyDynamic3DTextLabel(VehicleLabel[PI[playerid][PlayerCarID][1]]);
				    VehicleLabel[PI[playerid][PlayerCarID][1]] = Text3D:INVALID_3DTEXT_ID;
				}
				if(strcmp(PI[playerid][pNumberVehicle],"None",true,64) != 0)
				{
					format(totalstring,220,"%s",PI[playerid][pNumberVehicle1]);
					VehicleLabel[PI[playerid][PlayerCarID][1]] = CreateDynamic3DTextLabel(totalstring, 0xFFFFFFFF, 0, 0, 0, 10.0,INVALID_PLAYER_ID, PI[playerid][PlayerCarID][1], 1);
				}
				else
				{
				    VehicleLabel[PI[playerid][PlayerCarID][1]] = CreateDynamic3DTextLabel("[ ÒÐÀÍÇÈÒ ]", 0xFFFFFFFF, 0, 0, 0, 10.0,INVALID_PLAYER_ID, PI[playerid][PlayerCarID][1], 1);
				}
			}
			SetVehicleNumberPlate(PI[playerid][PlayerCarID][1], PI[playerid][pNumberVehicle1]);
		}
		SendClientMessage(playerid,COLOR_BLUE,"Òðàíñïîðò {FFCC00}¹2 {1D99D4}äîñòàâëåí ê ìåñòó ïàðêîâêè.");
	}
	return 1;
}

 

 

@odosenok

Спойлер

// CTO
		case D_CTO:
		{
			if(response)
			{
				if(GetPlayerState(playerid) != 2) return SendClientMessage(playerid, COLOR_GREY, ""cPS"Âû äîëæíû íàõîäèòñÿ çà ðóëåì ñâîåãî àâòî!");
                if(PlayersMenu[playerid] > 0) return SendClientMessage(playerid, COLOR_GREY, BackTextDraw);
				new pveh = GetPlayerVehicleID(playerid);
				SetVehiclePos(pveh, 1105.7463, 1542.9768, 2316.1677);
				SetVehicleZAngle(pveh, 180.5082);
				SetPlayerInterior(playerid, 3);
				SetPlayerVirtualWorld(playerid, playerid);
				SetVehicleVirtualWorld(pveh, playerid);
				LinkVehicleToInterior(pveh, 3);
				PutPlayerInVehicle(playerid, pveh, 0);
                SetPVarInt(playerid, "AntiBreik", 3);
				SetPlayerCameraPos(playerid, 1108.8273, 1537.4861, 2317.2312);
				SetPlayerCameraLookAt(playerid, 1108.3352, 1538.3552, 2317.0540);
				TogglePlayerControllable(playerid, false);
				SetPVarInt(playerid, "UsedCTO", 1);
				for(new i; i < 5; i++) PlayerTextDrawShow(playerid, PlayerMenu[playerid][i]);
				for(new i; i < 6; i++) TextDrawShowForPlayer(playerid, KolvDialog[i]);
				for(new i; i < 6; i++) PlayerTextDrawShow(playerid, NameDialog[playerid][i]);
				PlayerTextDrawSetString(playerid, PlayerMenu[playerid][2], "Ìåíþ òþíèíãà");
				PlayerTextDrawSetString(playerid, NameDialog[playerid][0], "Öâåò");
				PlayerTextDrawSetString(playerid, NameDialog[playerid][1], "Ãèäðàâëèêà");
				PlayerTextDrawSetString(playerid, NameDialog[playerid][2], "Íèòðî");
				PlayerTextDrawSetString(playerid, NameDialog[playerid][3], "Äèñêè");
				PlayerTextDrawSetString(playerid, NameDialog[playerid][4], "Âèíèëû");
				PlayerTextDrawSetString(playerid, NameDialog[playerid][5], "Ðåìîíò");
				PlayersMenu[playerid] = 2;//2 - Òþíèíã
				SelectTextDraw(playerid, 0xFF4040AA);
			}
		}
                                 
                                 
        case D_CTO+1: // CTO
		{
			if(response)
			{
				new bizzid = GetPVarInt(playerid,"CTObizzid");
				new till = BizzInfo[bizzid][bTill];
				new string[350];
				switch(listitem)
				{
					case 0:
					{
						SendMes(playerid,COLOR_WHITE,"Ñòîèìîñòü ïåðåêðàñêè: %dð", till*5);
						ShowPlayerDialog(playerid, D_CTO+4, 1, "{"#cSV"}Ïåðåêðàñêà", "{FFFFFF}Ââåäèòå îñíîâíîé è äîïîëíèòåëüíûé öâåò òðàíñïîðòà ÷åðåç çàïÿòóþ", "Ïåðåêðàñèòü", "Íàçàä");
					}
					case 1:
					{
						if(GetVehicleComponentInSlot(GetPlayerVehicleID(playerid),CARMODTYPE_HYDRAULICS) != 1087)
						{
							format(string,128,"{FFFFFF}Ñòîèìîñòü óñòàíîâêè: %dð\nÂû óâåðåíû, ÷òî õîòèòå êóïèòü è ïîñòàâèòü ãèäðàâëèêó?",till*100);
							ShowPlayerDialog(playerid,D_CTO+3,DIALOG_STYLE_MSGBOX,"{"#cSV"}Óñòàíîâêà ãèäðàâëèêè",string,"Äà","Íàçàä");
						}
						else
						{
							ShowPlayerDialog(playerid,D_CTO+3,DIALOG_STYLE_MSGBOX,"{"#cSV"}Óäàëåíèå ãèäðàâëèêè","{FFFFFF}Âû óâåðåíû, ÷òî õîòèòå óäàëèòü ãèäðàâëèêó?","Äà","Íàçàä");
						}
					}
					case 2:
					{
						format(string,128,"1. Nitro x2\t\t[%dð]\n2. Nitro x5\t\t[%dð]\n3. Nitro x10\t\t[%dð]",till*80,till*150,till*300);
						ShowPlayerDialog(playerid,D_CTO+5,DIALOG_STYLE_LIST,"{"#cSV"}Çàêèñü àçîòà",string,"Êóïèòü","Íàçàä");
					}
					/*case 3:
					{
						format(string,350,"1. Shadow\t\t[%dð]\n2. Mega\t\t\t[%dð]\n3. Wires\t\t[%dð]\n4. Classic\t\t[%dð]\n5. Twist\t\t\t[%dð]\n6. Cutter\t\t[%dð]\n7. Grove\t\t[%dð]\n8. Atomic\t\t[%dð]\n9. Dollar\t\t[%dð]\n10. Switch\t\t[%dð]",till*60,till*79,till*53,till*73,till*93,till*80,till*42,till*100,till*200,till*300);
						ShowPlayerDialog(playerid,D_CTO+6,DIALOG_STYLE_LIST,"{"#cSV"}Ñìåíà äèñêîâ",string,"Ñìîòðåòü","Íàçàä");
					}*/
					case 3:
					{
						format(string,150,"1. Ïîêðàñî÷íàÿ ðàáîòà ¹1\t\t[%dð]\n2. Ïîêðàñî÷íàÿ ðàáîòà ¹2\t\t[%dð]\n3. Ïîêðàñî÷íàÿ ðàáîòà ¹3\t\t[%dð]",till*30,till*35,till*40);
						ShowPlayerDialog(playerid,D_CTO+7,DIALOG_STYLE_LIST,"{"#cSV"}Ïîêðàñî÷íûå ðàáîòû",string,"Ñìîòðåòü","Íàçàä");
					}
					case 5:
					{
						new c = GetPlayerVehicleID(playerid);
						new getmodel = GetVehicleModel(c);
						if(getmodel == 562 || getmodel == 560 || getmodel == 565 || getmodel == 561 || getmodel == 559 || getmodel == 558)
						{
							ShowPlayerDialog(playerid,D_CTO+15,DIALOG_STYLE_LIST,"{"#cSV"}Ñïîéëåðà","X-Flow\nAlien","Êóïèòü","Îòìåíà");
						}
						else SendClientMessage(playerid,COLOR_GREY,""cER"Äàííàÿ äåòàëü íåäîñòóïíà äëÿ âàøåé ìîäåëè");
					}
					case 6:
					{
						new c = GetPlayerVehicleID(playerid);
						new getmodel = GetVehicleModel(c);
						if(getmodel == 562 || getmodel == 560 || getmodel == 565 || getmodel == 561 || getmodel == 559 || getmodel == 558  || getmodel == 534  || getmodel == 536  || getmodel == 535  || getmodel == 576)
						{
							ShowPlayerDialog(playerid,D_CTO+16,DIALOG_STYLE_LIST,"{"#cSV"}Ïåðåäíèé áàìïåð","X-Flow\nAlien","Êóïèòü","Îòìåíà");
						}
						else SendClientMessage(playerid,COLOR_GREY,""cER"Äàííàÿ äåòàëü íåäîñòóïíà äëÿ âàøåé ìîäåëè");
					}
					case 7:
					{
						new c = GetPlayerVehicleID(playerid);
						new getmodel = GetVehicleModel(c);
						if(getmodel == 562 || getmodel == 560 || getmodel == 565 || getmodel == 561 || getmodel == 559 || getmodel == 558  || getmodel == 534  || getmodel == 536  || getmodel == 535  || getmodel == 576)
						{
							ShowPlayerDialog(playerid,D_CTO+17,DIALOG_STYLE_LIST,"{"#cSV"}Çàäíèé áàìïåð","X-Flow\nAlien","Êóïèòü","Îòìåíà");
						}
						else SendClientMessage(playerid, COLOR_GREY,""cER"Äàííàÿ äåòàëü íåäîñòóïíà äëÿ âàøåé ìîäåëè");
					}
					case 8:
					{
						new c = GetPlayerVehicleID(playerid);
						new getmodel = GetVehicleModel(c);
						if(getmodel == 562 || getmodel == 560 || getmodel == 565 || getmodel == 561 || getmodel == 559 || getmodel == 558  || getmodel == 534  || getmodel == 536  || getmodel == 535  || getmodel == 575 || getmodel == 576)
						{
							ShowPlayerDialog(playerid,D_CTO+18,DIALOG_STYLE_LIST,"{"#cSV"}Áîêîâûå þáêè","X-Flow\nAlien","Êóïèòü","Îòìåíà");
						}
						else SendClientMessage(playerid, COLOR_GREY,""cER"Äàííàÿ äåòàëü íåäîñòóïíà äëÿ âàøåé ìîäåëè");
					}
					case 9:
					{
						new c = GetPlayerVehicleID(playerid);
						new getmodel = GetVehicleModel(c);
						if(getmodel == 562 || getmodel == 560 || getmodel == 565 || getmodel == 561 || getmodel == 559 || getmodel == 558  || getmodel == 534  || getmodel == 536  || getmodel == 535  || getmodel == 575 || getmodel == 576)
						{
							ShowPlayerDialog(playerid,D_CTO+19,DIALOG_STYLE_LIST,"{"#cSV"}Êðûøà","X-Flow\nAlien","Êóïèòü","Îòìåíà");
						}
						else SendClientMessage(playerid, COLOR_GREY,""cER"Äàííàÿ äåòàëü íåäîñòóïíà äëÿ âàøåé ìîäåëè");
					}
				}
			}
		}
	case D_CTO+15:
		{
			if(response)
			{
				new i = GetPVarInt(playerid,"CTObizzid");
				new till = BizzInfo[i][bTill];
				new tune[2], c = GetPlayerVehicleID(playerid);
				if(GetVehicleModel(c) == 562) tune[0] = 1146, tune[1] = 1147;
				else if(GetVehicleModel(c) == 560) tune[0] = 1138, tune[1] = 1139;
				else if(GetVehicleModel(c) == 565) tune[0] = 1049, tune[1] = 1050;
				else if(GetVehicleModel(c) == 561) tune[0] = 1058, tune[1] = 1060;
				else if(GetVehicleModel(c) == 559) tune[0] = 1158, tune[1] = 1162;
				else if(GetVehicleModel(c) == 558) tune[0] = 1063, tune[1] = 1064;
				else return SendClientMessage(playerid, COLOR_GREY, ""cER"Äàííàÿ äåòàëü 'Ñïîéëåð' íåäîñòóïíà äëÿ âàøåé ìîäåëè");
				AddVehicleComponent(c, tune[listitem]);
				SetPVarInt(playerid,"PriceCTO",till*25);
				SetPVarInt(playerid,"ComponentCTO",tune[listitem]);
				SetPVarInt(playerid,"ProductCTO",25);
				new string[128];
				format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé çàï÷àñòè: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*79);
				ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
			}
		}
	case D_CTO+16:
		{
			if(response)
			{
				new i = GetPVarInt(playerid,"CTObizzid");
				new till = BizzInfo[i][bTill];
				new tune[2], c = GetPlayerVehicleID(playerid);
				if(GetVehicleModel(c) == 562) tune[0] = 1171, tune[1] = 1172;
				else if(GetVehicleModel(c) == 560) tune[0] = 1169, tune[1] = 1170;
				else if(GetVehicleModel(c) == 575) tune[0] = 1174, tune[1] = 1175;
				else if(GetVehicleModel(c) == 565) tune[0] = 1152, tune[1] = 1153;
				else if(GetVehicleModel(c) == 561) tune[0] = 1155, tune[1] = 1157;
				else if(GetVehicleModel(c) == 559) tune[0] = 1160, tune[1] = 1173;
				else if(GetVehicleModel(c) == 558) tune[0] = 1165, tune[1] = 1166;
				else if(GetVehicleModel(c) == 534) tune[0] = 1179, tune[1] = 1185;
				else if(GetVehicleModel(c) == 536) tune[0] = 1181, tune[1] = 1182;
				else if(GetVehicleModel(c) == 535) tune[0] = 1188, tune[1] = 1189;
				else if(GetVehicleModel(c) == 576) tune[0] = 1190, tune[1] = 1191;
				else return SendClientMessage(playerid, COLOR_GREY, ""cER"Äàííàÿ äåòàëü 'Ïåðåäíèé áàìïåð' íåäîñòóïíà äëÿ âàøåé ìîäåëè");
				AddVehicleComponent(c, tune[listitem]);
				SetPVarInt(playerid,"PriceCTO",till*25);
				SetPVarInt(playerid,"ComponentCTO",tune[listitem]);
				SetPVarInt(playerid,"ProductCTO",25);
				new string[128];
				format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé çàï÷àñòè: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*25);
				ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
			}
		}
	case D_CTO+17:
		{
			if(response)
			{
				new i = GetPVarInt(playerid,"CTObizzid");
				new till = BizzInfo[i][bTill];
				new tune[2], c = GetPlayerVehicleID(playerid);
				if(GetVehicleModel(c) == 562) tune[0] = 1148, tune[1] = 1149;
				else if(GetVehicleModel(c) == 560) tune[0] = 1140, tune[1] = 1141;
				else if(GetVehicleModel(c) == 575) tune[0] = 1176, tune[1] = 1177;
				else if(GetVehicleModel(c) == 565) tune[0] = 1150, tune[1] = 1151;
				else if(GetVehicleModel(c) == 561) tune[0] = 1154, tune[1] = 1156;
				else if(GetVehicleModel(c) == 559) tune[0] = 1159, tune[1] = 1161;
				else if(GetVehicleModel(c) == 558) tune[0] = 1167, tune[1] = 1168;
				else if(GetVehicleModel(c) == 534) tune[0] = 1178, tune[1] = 1180;
				else if(GetVehicleModel(c) == 536) tune[0] = 1183, tune[1] = 1184;
				else if(GetVehicleModel(c) == 535) tune[0] = 1186, tune[1] = 1187;
				else if(GetVehicleModel(c) == 576) tune[0] = 1192, tune[1] = 1193;
				else return SendClientMessage(playerid, COLOR_GREY, ""cER"Äàííàÿ äåòàëü 'Çàäíèé áàìïåð' íåäîñòóïíà äëÿ âàøåé ìîäåëè");
				AddVehicleComponent(c, tune[listitem]);
				SetPVarInt(playerid,"PriceCTO",till*25);
				SetPVarInt(playerid,"ComponentCTO",tune[listitem]);
				SetPVarInt(playerid,"ProductCTO",25);
				new string[128];
				format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé çàï÷àñòè: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*79);
				ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
			}
		}
	case D_CTO+18:
		{
			if(response)
			{
				new i = GetPVarInt(playerid,"CTObizzid");
				new till = BizzInfo[i][bTill];
				new tune[4], c = GetPlayerVehicleID(playerid);
				if(GetVehicleModel(c) == 562) tune[0] = 1041, tune[1] = 1036, tune[2] = 1039, tune[3] = 1040;
				else if(GetVehicleModel(c) == 560) tune[0] = 1031, tune[1] = 1026, tune[2] = 1030, tune[3] = 1027;
				else if(GetVehicleModel(c) == 575) { SendClientMessage(playerid, COLOR_GREY, ""cER"Íåâîçìîæíî ïðèêðåïèòü áîêîâûå þáêè ê äàííîìó òðàíñïîðòó!"); return ShowSTODialog(playerid); }
				else if(GetVehicleModel(c) == 565) tune[0] = 1048, tune[1] = 1047, tune[2] = 1039, tune[3] = 1040;
				else if(GetVehicleModel(c) == 561) tune[0] = 1057, tune[1] = 1056, tune[2] = 1063, tune[3] = 1062;
				else if(GetVehicleModel(c) == 559) tune[0] = 1070, tune[1] = 1069, tune[2] = 1072, tune[3] = 1071;
				else if(GetVehicleModel(c) == 558) tune[0] = 1095, tune[1] = 1090, tune[2] = 1093, tune[3] = 1194;
				else if(GetVehicleModel(c) == 534) tune[0] = 1106, tune[1] = 1101, tune[2] = 1124, tune[3] = 1122;
				else if(GetVehicleModel(c) == 536) tune[0] = 1108, tune[1] = 1107, tune[2] = 1108, tune[3] = 1107;
				else if(GetVehicleModel(c) == 535) tune[0] = 1119, tune[1] = 1121, tune[2] = 1121, tune[3] = 1120;
				else if(GetVehicleModel(c) == 576) tune[0] = 1134, tune[1] = 1137, tune[2] = 1134, tune[3] = 1137;
				else return SendClientMessage(playerid, COLOR_GREY, ""cER"Äàííàÿ äåòàëü 'Áîêîâûå Þáêè' íåäîñòóïíà äëÿ âàøåé ìîäåëè");
				AddVehicleComponent(c, tune[listitem]);
				//AddVehicleComponent(c, tune[listitem+2]);
				SetPVarInt(playerid,"PriceCTO",till*25);
				SetPVarInt(playerid,"ComponentCTO",tune[listitem]);
				SetPVarInt(playerid,"ComponentCTO2", tune[listitem+2]);
				SetPVarInt(playerid,"ProductCTO",25);
				new string[128];
				format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé çàï÷àñòè: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*79);
				ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
			}
//			else ShowSTODialog(playerid);
		}
	case D_CTO+19:
		{
			if(response)
			{
				new i = GetPVarInt(playerid,"CTObizzid");
				new till = BizzInfo[i][bTill];
				new tune[2], c = GetPlayerVehicleID(playerid);
				if(GetVehicleModel(c) == 562) tune[0] = 1035, tune[1] = 1038;
				else if(GetVehicleModel(c) == 560) tune[0] = 1032, tune[1] = 1033;
				else if(GetVehicleModel(c) == 575) { SendClientMessage(playerid, COLOR_GREY, ""cER"Íåâîçìîæíî ïðèêðåïèòü êðûøó ê äàííîìó òðàíñïîðòó!"); return ShowSTODialog(playerid); }
				else if(GetVehicleModel(c) == 565) tune[0] = 1053, tune[1] = 1054;
				else if(GetVehicleModel(c) == 561) tune[0] = 1055, tune[1] = 1061;
				else if(GetVehicleModel(c) == 559) tune[0] = 1067, tune[1] = 1068;
				else if(GetVehicleModel(c) == 558) tune[0] = 1088, tune[1] = 1091;
				else if(GetVehicleModel(c) == 534) { SendClientMessage(playerid, COLOR_GREY, ""cER"Íåâîçìîæíî ïðèêðåïèòü êðûøó ê äàííîìó òðàíñïîðòó!"); return ShowSTODialog(playerid); }
				else if(GetVehicleModel(c) == 536) tune[0] = 1103, tune[1] = 1128;
				else if(GetVehicleModel(c) == 535) tune[0] = 1130, tune[1] = 1131;
				else if(GetVehicleModel(c) == 576) { SendClientMessage(playerid, COLOR_GREY, ""cER"Íåâîçìîæíî ïðèêðåïèòü êðûøó ê äàííîìó òðàíñïîðòó!"); return ShowSTODialog(playerid); }
				else
				{
					ShowSTODialog(playerid);
					return SendClientMessage(playerid, COLOR_GREY, ""cER"Äàííàÿ äåòàëü 'Êðûøà' íåäîñòóïíà äëÿ âàøåé ìîäåëè");
				}
				AddVehicleComponent(c, tune[listitem]);
				SetPVarInt(playerid,"PriceCTO",till*25);
				SetPVarInt(playerid,"ComponentCTO",tune[listitem]);
				SetPVarInt(playerid,"ProductCTO",25);
				new string[128];
				format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé çàï÷àñòè: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*79);
				ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
			}
//			else ShowSTODialog(playerid);
		}
	case D_CTO+3: // CTO
		{
			if(!response) return 1;
			new i = GetPVarInt(playerid,"CTObizzid");
			new till = BizzInfo[i][bTill];
			if(GetVehicleComponentInSlot(GetPlayerVehicleID(playerid),CARMODTYPE_HYDRAULICS) != 1087)
			{
				if(GetMoney(playerid) < till*100) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
				TransferMoney(playerid, -1, till*100);
				if(BizzInfo[i][bProduct] > 0)
				{
					BizzInfo[i][bMoney] += till*100;
					BizzInfo[i][bProduct] -= 100;
					BizzPay[i] += till*100;
					MysqlUpdateBizzInt(i, "money", BizzInfo[i][bMoney]);
					MysqlUpdateBizzInt(i, "product", BizzInfo[i][bProduct]);
				}
				SendClientMessage(playerid,COLOR_GREEN,"Âû ïîñòàâèëè ãèäðàâëèêó!");
				AddVehicleComponent(GetPlayerVehicleID(playerid),1087);
			}
			else
			{
				SendClientMessage(playerid,COLOR_RED,"Âû óäàëèëè ãèäðàâëèêó!");
				RemoveVehicleComponent(GetPlayerVehicleID(playerid),1087);
			}
			SaveVehicleTuning(playerid);
		}
	case D_CTO+4: // CTO öâåòà 1
		{
			if(!response) return 1;
			new color[2];
			if(GetPlayerVehicleID(playerid) == PI[playerid][PlayerCarID][0])
			{
				if(sscanf(inputtext, "p<,>ii",color[0], color[1])) return ShowPlayerDialog(playerid, D_CTO+4, 1, "Ïåðåêðàñêà", "Ââåäèòå îñíîâíîé è äîïîëíèòåëüíûé öâåò òðàíñïîðòà ÷åðåç çàïÿòóþ", "Ïðèíÿòü", "Íàçàä");
				if(color[0] < 0 || color[0] > 255)
				{
					ShowPlayerDialog(playerid, D_CTO+4, 1, "{ffa500}Ïåðåêðàñêà", "{FFFFFF}Ââåäèòå îñíîâíîé è äîïîëíèòåëüíûé öâåò òðàíñïîðòà ÷åðåç çàïÿòóþ", "Ïðèíÿòü", "Íàçàä");
					return SendClientMessage(playerid, COLOR_GREY, "ID öâåòà îò 0 äî 255!");
				}
				if(color[1] < 0 || color[1] > 255)
				{
					ShowPlayerDialog(playerid, D_CTO+4, 1, "{ffa500}Ïåðåêðàñêà", "{FFFFFF}Ââåäèòå îñíîâíîé è äîïîëíèòåëüíûé öâåò òðàíñïîðòà ÷åðåç çàïÿòóþ", "Ïðèíÿòü", "Íàçàä");
					return SendClientMessage(playerid, COLOR_GREY, "ID öâåòà îò 0 äî 255!");
				}
				new i = GetPVarInt(playerid,"CTObizzid");
				new till = BizzInfo[i][bTill];
				if(GetMoney(playerid) < till*5) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
				TransferMoney(playerid, -1, till*5);
				if(BizzInfo[i][bProduct] > 0)
				{
					BizzInfo[i][bMoney] += till*5;
					BizzInfo[i][bProduct] -= 5;
					BizzPay[i] += till*5;
					MysqlUpdateBizzInt(i, "money", BizzInfo[i][bMoney]);
					MysqlUpdateBizzInt(i, "product", BizzInfo[i][bProduct]);
				}
				PI[playerid][cColor][0] = color[0];
				PI[playerid][cColor][1] = color[1];
				ChangeVehicleColor(GetPlayerVehicleID(playerid), color[0], color[1]);
				SendClientMessage(playerid,COLOR_GREEN,""cDA"Âû óñïåøíî ïåðåêðàñèëè ñâîå àâòî");
			}
			if(GetPlayerVehicleID(playerid) == PI[playerid][PlayerCarID][1])
			{
				if(sscanf(inputtext, "p<,>ii",color[0], color[1])) return ShowPlayerDialog(playerid, D_CTO+4, 1, "Ïåðåêðàñêà", "Ââåäèòå îñíîâíîé è äîïîëíèòåëüíûé öâåò òðàíñïîðòà ÷åðåç çàïÿòóþ", "Ïðèíÿòü", "Íàçàä");
				if(color[0] < 0 || color[0] > 255)
				{
					ShowPlayerDialog(playerid, D_CTO+4, 1, "{ffa500}Ïåðåêðàñêà", "{FFFFFF}Ââåäèòå îñíîâíîé è äîïîëíèòåëüíûé öâåò òðàíñïîðòà ÷åðåç çàïÿòóþ", "Ïðèíÿòü", "Íàçàä");
					return SendClientMessage(playerid, COLOR_GREY, "ID öâåòà îò 0 äî 255!");
				}
				if(color[1] < 0 || color[1] > 255)
				{
					ShowPlayerDialog(playerid, D_CTO+4, 1, "{ffa500}Ïåðåêðàñêà", "{FFFFFF}Ââåäèòå îñíîâíîé è äîïîëíèòåëüíûé öâåò òðàíñïîðòà ÷åðåç çàïÿòóþ", "Ïðèíÿòü", "Íàçàä");
					return SendClientMessage(playerid, COLOR_GREY, "ID öâåòà îò 0 äî 255!");
				}
				new i = GetPVarInt(playerid,"CTObizzid");
				new till = BizzInfo[i][bTill];
				if(GetMoney(playerid) < till*5) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
				TransferMoney(playerid, -1, till*5);
				if(BizzInfo[i][bProduct] > 0)
				{
					BizzInfo[i][bMoney] += till*5;
					BizzInfo[i][bProduct] -= 5;
					BizzPay[i] += till*5;
					MysqlUpdateBizzInt(i, "money", BizzInfo[i][bMoney]);
					MysqlUpdateBizzInt(i, "product", BizzInfo[i][bProduct]);
				}
				PI[playerid][cColor1][0] = color[0];
				PI[playerid][cColor1][1] = color[1];
				ChangeVehicleColor(GetPlayerVehicleID(playerid), color[0], color[1]);
				SendClientMessage(playerid,COLOR_GREEN,""cDA"Âû óñïåøíî ïåðåêðàñèëè ñâîå àâòî");
			}
		}
	case D_CTO+5: // CTO
		{
			if(!response) return 1;
			new i = GetPVarInt(playerid,"CTObizzid");
			new till = BizzInfo[i][bTill];
			switch(listitem)
			{
			case 0:
				{
					if(GetMoney(playerid) < till*80) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
					TransferMoney(playerid, -1, till*80);
					if(BizzInfo[i][bProduct] > 0)
					{
						BizzInfo[i][bMoney] += till*80;
						BizzInfo[i][bProduct] -= 80;
						BizzPay[i] += till*80;
						MysqlUpdateBizzInt(i, "money", BizzInfo[i][bMoney]);
						MysqlUpdateBizzInt(i, "product", BizzInfo[i][bProduct]);
					}
					SendMes(playerid,COLOR_GREEN,"Âû ïîñòàâèëè Nitro x2 çà %dð", till*80);
					AddVehicleComponent(GetPlayerVehicleID(playerid),1009);
					SaveVehicleTuning(playerid);
				}
			case 1:
				{
					if(GetMoney(playerid) < till*150) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
					TransferMoney(playerid, -1, till*150);
					if(BizzInfo[i][bProduct] > 0)
					{
						BizzInfo[i][bMoney] += till*150;
						BizzInfo[i][bProduct] -= 150;
						BizzPay[i] += till*150;
						MysqlUpdateBizzInt(i, "money", BizzInfo[i][bMoney]);
						MysqlUpdateBizzInt(i, "product", BizzInfo[i][bProduct]);
					}
					SendMes(playerid,COLOR_GREEN,"Âû ïîñòàâèëè Nitro x5 çà %dð", till*150);
					AddVehicleComponent(GetPlayerVehicleID(playerid),1008);
					SaveVehicleTuning(playerid);
				}
			case 2:
				{
					if(GetMoney(playerid) < till*300) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
					TransferMoney(playerid, -1, till*300);
					if(BizzInfo[i][bProduct] > 0)
					{
						BizzInfo[i][bMoney] += till*300;
						BizzInfo[i][bProduct] -= 300;
						BizzPay[i] += till*300;
						MysqlUpdateBizzInt(i, "money", BizzInfo[i][bMoney]);
						MysqlUpdateBizzInt(i, "product", BizzInfo[i][bProduct]);
					}
					SendMes(playerid,COLOR_GREEN,"Âû ïîñòàâèëè Nitro x10 çà %dð", till*300);
					AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
					SaveVehicleTuning(playerid);
				}
			}
		}
	case D_CTO+6: // CTO
		{
			if(response)
			{
				new i = GetPVarInt(playerid,"CTObizzid");
				new till = BizzInfo[i][bTill];
				new string[128];
				switch(listitem)
				{
				case 0:
					{
						if(GetMoney(playerid) < till*60) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
						SendMes(playerid,COLOR_GREEN,"Âû ïîñòàâèëè äèñêè Shadow, èõ ñòîèìîñòü %dð", till*60);
						AddVehicleComponent(GetPlayerVehicleID(playerid),1073);
						SetPVarInt(playerid,"PriceCTO",till*60);
						SetPVarInt(playerid,"ComponentCTO",1073);
						SetPVarInt(playerid,"ProductCTO",60);
						format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé çàï÷àñòè: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*60);
						ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
					}
				case 1:
					{
						if(GetMoney(playerid) < till*79) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
						SendMes(playerid,COLOR_GREEN,"Âû ïîñòàâèëè äèñêè Mega, èõ ñòîèìîñòü %dð", till*79);
						AddVehicleComponent(GetPlayerVehicleID(playerid),1074);
						SetPVarInt(playerid,"PriceCTO",till*79);
						SetPVarInt(playerid,"ComponentCTO",1074);
						SetPVarInt(playerid,"ProductCTO",79);
						format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé çàï÷àñòè: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*79);
						ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
					}
				case 2:
					{
						if(GetMoney(playerid) < till*53) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
						SendMes(playerid,COLOR_GREEN,"Âû ïîñòàâèëè äèñêè Wires, èõ ñòîèìîñòü %dð", till*53);
						AddVehicleComponent(GetPlayerVehicleID(playerid),1076);
						SetPVarInt(playerid,"PriceCTO",till*53);
						SetPVarInt(playerid,"ComponentCTO",1076);
						SetPVarInt(playerid,"ProductCTO",53);
						format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé çàï÷àñòè: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*53);
						ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
					}
				case 3:
					{
						if(GetMoney(playerid) < till*73) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
						SendMes(playerid,COLOR_GREEN,"Âû ïîñòàâèëè äèñêè Classic, èõ ñòîèìîñòü %dð", till*73);
						AddVehicleComponent(GetPlayerVehicleID(playerid),1077);
						SetPVarInt(playerid,"PriceCTO",till*73);
						SetPVarInt(playerid,"ComponentCTO",1077);
						SetPVarInt(playerid,"ProductCTO",73);
						format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé çàï÷àñòè: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*73);
						ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
					}
				case 4:
					{
						if(GetMoney(playerid) < till*93) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
						SendMes(playerid,COLOR_GREEN,"Âû ïîñòàâèëè äèñêè Twist, èõ ñòîèìîñòü %dð", till*93);
						AddVehicleComponent(GetPlayerVehicleID(playerid),1078);
						SetPVarInt(playerid,"PriceCTO",till*93);
						SetPVarInt(playerid,"ComponentCTO",1078);
						SetPVarInt(playerid,"ProductCTO",93);
						format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé çàï÷àñòè: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*93);
						ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
					}
				case 5:
					{
						if(GetMoney(playerid) < till*80) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
						SendMes(playerid,COLOR_GREEN,"Âû ïîñòàâèëè äèñêè Cutter, èõ ñòîèìîñòü %dð", till*80);
						AddVehicleComponent(GetPlayerVehicleID(playerid),1079);
						SetPVarInt(playerid,"PriceCTO",till*80);
						SetPVarInt(playerid,"ComponentCTO",1078);
						SetPVarInt(playerid,"ProductCTO",80);
						format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé çàï÷àñòè: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*80);
						ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
					}
				case 6:
					{
						if(GetMoney(playerid) < till*42) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
						SendMes(playerid,COLOR_GREEN,"Âû ïîñòàâèëè äèñêè Grove, èõ ñòîèìîñòü %dð", till*42);
						AddVehicleComponent(GetPlayerVehicleID(playerid),1081);
						SetPVarInt(playerid,"PriceCTO",till*42);
						SetPVarInt(playerid,"ComponentCTO",1081);
						SetPVarInt(playerid,"ProductCTO",42);
						format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé çàï÷àñòè: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*42);
						ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
					}
				case 7:
					{
						if(GetMoney(playerid) < till*100) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
						SendMes(playerid,COLOR_GREEN,"Âû ïîñòàâèëè äèñêè Atomic, èõ ñòîèìîñòü %dð", till*100);
						AddVehicleComponent(GetPlayerVehicleID(playerid),1085);
						SetPVarInt(playerid,"PriceCTO",till*100);
						SetPVarInt(playerid,"ComponentCTO",1085);
						SetPVarInt(playerid,"ProductCTO",100);
						format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé çàï÷àñòè: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*100);
						ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
					}
				case 8:
					{
						if(GetMoney(playerid) < till*200) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
						SendMes(playerid,COLOR_GREEN,"Âû ïîñòàâèëè äèñêè Dollar, èõ ñòîèìîñòü %dð", till*200);
						AddVehicleComponent(GetPlayerVehicleID(playerid),1083);
						SetPVarInt(playerid,"PriceCTO",till*200);
						SetPVarInt(playerid,"ComponentCTO",1083);
						SetPVarInt(playerid,"ProductCTO",200);
						format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé çàï÷àñòè: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*200);
						ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
					}
				case 9:
					{
						if(GetMoney(playerid) < till*300) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
						SendMes(playerid,COLOR_GREEN,"Âû ïîñòàâèëè äèñêè Switch, èõ ñòîèìîñòü %dð", till*300);
						AddVehicleComponent(GetPlayerVehicleID(playerid),1080);
						SetPVarInt(playerid,"PriceCTO",till*300);
						SetPVarInt(playerid,"ComponentCTO",1080);
						SetPVarInt(playerid,"ProductCTO",300);
						format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé çàï÷àñòè: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*300);
						ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
					}
				}
			}
			else
			{
			    if(GetPlayerState(playerid) && PI[playerid][PlayerCarID][0])
			    {
					SendClientMessage(playerid, COLOR_RED, "Âû îòìåíèëè ïîêóïêó");
					RemoveVehicleComponent(GetPlayerVehicleID(playerid), GetPVarInt(playerid,"ComponentCTO"));
					for(new s; s < 14; s++) if(PI[playerid][cVehcoms][s] != 0) AddVehicleComponent(GetPlayerVehicleID(playerid), PI[playerid][cVehcoms][s]);
				}
				if(GetPlayerState(playerid) && PI[playerid][PlayerCarID][1])
			    {
					SendClientMessage(playerid, COLOR_RED, "Âû îòìåíèëè ïîêóïêó");
					RemoveVehicleComponent(GetPlayerVehicleID(playerid), GetPVarInt(playerid,"ComponentCTO"));
					for(new s; s < 14; s++) if(PI[playerid][cVehcoms1][s] != 0) AddVehicleComponent(GetPlayerVehicleID(playerid), PI[playerid][cVehcoms1][s]);
				}
			}
		}
	case D_CTO+7: // CTO
		{
			if(response)
			{
				new i = GetPVarInt(playerid,"CTObizzid");
				new till = BizzInfo[i][bTill];
				new string[128];
				switch(listitem)
				{
				case 0:
					{
						if(GetMoney(playerid) < till*30) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
						ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),0);
						SetPVarInt(playerid,"PriceCTO",till*30);
						SetPVarInt(playerid,"PaintjobCTO",0);
						SetPVarInt(playerid,"ProductCTO",30);
						format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé ïîêðàñî÷íîé ðàáîòû: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*30);
						ShowPlayerDialog(playerid,D_CTO+13,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");

					}
				case 1:
					{
						if(GetMoney(playerid) < till*35) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
						ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),1);
						SetPVarInt(playerid,"PriceCTO",till*35);
						SetPVarInt(playerid,"PaintjobCTO",1);
						SetPVarInt(playerid,"ProductCTO",35);
						format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé ïîêðàñî÷íîé ðàáîòû: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*35);
						ShowPlayerDialog(playerid,D_CTO+13,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
					}
				case 2:
					{
						if(GetMoney(playerid) < till*40) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
						ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),2);
						SetPVarInt(playerid,"PriceCTO",till*40);
						SetPVarInt(playerid,"PaintjobCTO",2);
						SetPVarInt(playerid,"ProductCTO",40);
						format(string,128,"{FFFFFF}Ñòîèìîñòü ýòîé ïîêðàñî÷íîé ðàáîòû: %d\nÂû íàäóìàëè ñ ïîêóïêîé?",till*40);
						ShowPlayerDialog(playerid,D_CTO+13,DIALOG_STYLE_MSGBOX,"{"#cSV"}Ïîäòâåðæäåíèå ïîêóïêè",string,"Êóïèòü","Îòìåíà");
					}
				case 3:
					{
						ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),3);
						SendClientMessage(playerid,COLOR_RED,"Âû óäàëèëè ïîêðàñî÷íóþ ðàáîòó íà àâòî");
					}
				}
			}
		}
	case D_CTO+12: // CTO
		{
			new i = GetPVarInt(playerid,"CTObizzid");
			if(response)
			{
				TransferMoney(playerid, -1, GetPVarInt(playerid,"PriceCTO"));
				if(BizzInfo[i][bProduct] > 0)
				{
					BizzInfo[i][bMoney] += GetPVarInt(playerid,"PriceCTO");
					BizzInfo[i][bProduct] -= GetPVarInt(playerid,"ProductCTO");
					BizzPay[i] += GetPVarInt(playerid,"PriceCTO");
					MysqlUpdateBizzInt(i, "money", BizzInfo[i][bMoney]);
					MysqlUpdateBizzInt(i, "product", BizzInfo[i][bProduct]);
				}
				SaveVehicleTuning(playerid);
				SendClientMessage(playerid,COLOR_GREEN,""cDA"Âû êóïèëè ýòó çàï÷àñòü");
			}
			else
			{
			    if(GetPlayerState(playerid) && PI[playerid][PlayerCarID][0])
			    {
					SendClientMessage(playerid, COLOR_RED, "Âû îòìåíèëè ïîêóïêó");
					RemoveVehicleComponent(GetPlayerVehicleID(playerid), GetPVarInt(playerid,"ComponentCTO"));
					for(new s; s < 14; s++) if(PI[playerid][cVehcoms][s] != 0) AddVehicleComponent(GetPlayerVehicleID(playerid), PI[playerid][cVehcoms][s]);
				}
				if(GetPlayerState(playerid) && PI[playerid][PlayerCarID][1])
			    {
					SendClientMessage(playerid, COLOR_RED, "Âû îòìåíèëè ïîêóïêó");
					RemoveVehicleComponent(GetPlayerVehicleID(playerid), GetPVarInt(playerid,"ComponentCTO"));
					for(new s; s < 14; s++) if(PI[playerid][cVehcoms1][s] != 0) AddVehicleComponent(GetPlayerVehicleID(playerid), PI[playerid][cVehcoms1][s]);
				}
				
			}
		}
	case D_CTO+13:
		{
			new i = GetPVarInt(playerid,"CTObizzid");
			if(response)
			{
				if(GetPlayerVehicleID(playerid) == PI[playerid][PlayerCarID][0])
				{
					TransferMoney(playerid, -1, GetPVarInt(playerid,"PriceCTO"));
					if(BizzInfo[i][bProduct] > 0)
					{
						BizzInfo[i][bMoney] += GetPVarInt(playerid,"PriceCTO");
						BizzInfo[i][bProduct] -= GetPVarInt(playerid,"ProductCTO");
						BizzPay[i] += GetPVarInt(playerid,"PriceCTO");
						MysqlUpdateBizzInt(i, "money", BizzInfo[i][bMoney]);
						MysqlUpdateBizzInt(i, "product", BizzInfo[i][bProduct]);
					}
					SendMes(playerid,COLOR_GREEN,"Âû îïëàòèëè %d ðóá çà ïîêðàñî÷íóþ ðàáîòó", GetPVarInt(playerid,"PriceCTO"));
					PI[playerid][cPaintjob][0] = GetPVarInt(playerid,"PaintjobCTO");
					SaveVehicleTuning(playerid);
				}
				if(GetPlayerVehicleID(playerid) == PI[playerid][PlayerCarID][1])
				{
					TransferMoney(playerid, -1, GetPVarInt(playerid,"PriceCTO"));
					if(BizzInfo[i][bProduct] > 0)
					{
						BizzInfo[i][bMoney] += GetPVarInt(playerid,"PriceCTO");
						BizzInfo[i][bProduct] -= GetPVarInt(playerid,"ProductCTO");
						BizzPay[i] += GetPVarInt(playerid,"PriceCTO");
						MysqlUpdateBizzInt(i, "money", BizzInfo[i][bMoney]);
						MysqlUpdateBizzInt(i, "product", BizzInfo[i][bProduct]);
					}
					SendMes(playerid,COLOR_GREEN,"Âû îïëàòèëè %d ðóá çà ïîêðàñî÷íóþ ðàáîòó", GetPVarInt(playerid,"PriceCTO"));
					PI[playerid][cPaintjob][0] = GetPVarInt(playerid,"PaintjobCTO");
					SaveVehicleTuning(playerid);
				}
			}
			else
			{
			    if(GetPlayerVehicleID(playerid) == PI[playerid][PlayerCarID][0])
				{
					if(PI[playerid][cPaintjob][0] != 3) ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),PI[playerid][cPaintjob][0]);
					else
					{
						ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),3);
						ChangeVehicleColor(GetPlayerVehicleID(playerid), PI[playerid][cColor][0], PI[playerid][cColor][1]);
					}
					SendClientMessage(playerid,COLOR_RED,"Âû îòìåíèëè ïîêóïêó");
					SaveVehicleTuning(playerid);
				}
				if(GetPlayerVehicleID(playerid) == PI[playerid][PlayerCarID][1])
				{
					if(PI[playerid][cPaintjob][1] != 3) ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),PI[playerid][cPaintjob][1]);
					else
					{
						ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),3);
						ChangeVehicleColor(GetPlayerVehicleID(playerid), PI[playerid][cColor1][0], PI[playerid][cColor1][1]);
					}
					SendClientMessage(playerid,COLOR_RED,"Âû îòìåíèëè ïîêóïêó");
					SaveVehicleTuning(playerid);
				}
			}
		}
	case D_CTO+14: // CTO
		{
			new i = GetPVarInt(playerid,"CTObizzid");
			if(!response) return 1;
			if(GetMoney(playerid) < 15000) return SendClientMessage(playerid, COLOR_GREY, ""cER"Íåäîñòàòî÷íî ñðåäñòâ!");
			TransferMoney(playerid, -1, 15000);
			if(BizzInfo[i][bProduct] > 0)
			{
				BizzInfo[i][bMoney] += 15000;
				BizzInfo[i][bProduct] -= 150;
				BizzPay[i] += 15000;
				MysqlUpdateBizzInt(i, "money", BizzInfo[i][bMoney]);
				MysqlUpdateBizzInt(i, "product", BizzInfo[i][bProduct]);
				RepairVehicle(GetPlayerVehicleID(playerid));
			}
			SendClientMessage(playerid, COLOR_GREEN, "Âû îòðåìîíòèðîâàëè Âàø òðàíñïîðò çà 15.000 ðóáëåé!");
		}                         
                                 
                                 

 

 

Share this post


Link to post
Share on other sites

@Дарвин, ну, какой из этих кейсов отвечает за выход, в тот и добавьте что-то вроде такого:

new pveh = GetPlayerVehicleID(playerid);
SetVehiclePos(pveh, координаты_транспорта_на_улице);
SetVehicleZAngle(pveh, угол_поворота_транспорта_на_улице);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetVehicleVirtualWorld(pveh, 0);
LinkVehicleToInterior(pveh, 0);
PutPlayerInVehicle(playerid, pveh, 0);

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.