Перейти к содержанию
Авторизация  
#Pawno

Проблема с диалогом

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

#Pawno

вообщем после нажатия да не какого действия, не ошибок в логах нечего. 

cmd:sellcar(playerid, params[])
{
new cares[MAX_PLAYERS] = 0;
if(PlayerLogged[playerid] == false) return true;
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Вы должны быть за рулм");
//if(PI[playerid][cModel] == 0) return SendClientMessage(playerid, COLOR_GREY, "У вас нет автомобиля!");
if(GetPlayerVehicleID(playerid) == PI[playerid][cCarId][0]) cares[playerid]++, SetPVarInt(playerid, "number_cars", 1);
if(GetPlayerVehicleID(playerid) == PI[playerid][cCarId][1]) cares[playerid]++, SetPVarInt(playerid, "number_cars", 2);
if(GetPlayerVehicleID(playerid) == PI[playerid][cCarId][2]) cares[playerid]++, SetPVarInt(playerid, "number_cars", 3);
if(GetPlayerVehicleID(playerid) == PI[playerid][cCarId][3]) cares[playerid]++, SetPVarInt(playerid, "number_cars", 4);
if(GetPlayerVehicleID(playerid) == PI[playerid][cCarId][4]) cares[playerid]++, SetPVarInt(playerid, "number_cars", 5);
if(cares[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "Вы должны находиться в вашем личном транспорте!");
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 462) return SendClientMessage(playerid, COLOR_GREY, "Вы не можете продать мопед!");
ShowPlayerDialogFix(playerid, 19800, DIALOG_STYLE_MSGBOX, "{FFCD00}Продать транспорт", "{ffffff}Вы хотите продать свой транспорт?\n\n{FF6347}Внимание! Вам вернут только половину стоимости транспорта!\n\n!!! Для продажи авто игроку, введите /sellmycar [id] [цена] !!!", "Да", "Нет");
return true;
}
case 19800:
		{
		    if(response)
	     	{
				new carss = GetPVarInt(playerid, "number_car");
				switch(carss)
				{
				case 1:
					{

						DestroyDynamic3DTextLabel(VehicleLabel[PI[playerid][cCarId][0]]);
						SendMes(playerid, COLOR_LIGHTRED, "?? ??????? ????????? ?1, ??? ?????????? %i ??????", PI[playerid][cCost][0] / 2);
						GiveMoney(playerid, PI[playerid][cCost][0] / 2,"??????");
						DestroyVehicle(PI[playerid][cCarId][0]);
						PI[playerid][cCarId][0] = INVALID_VEHICLE_ID;
						PI[playerid][cModel][0]= 0;
						PI[playerid][cCost][0]= 0;
						PI[playerid][cLock][0]= 0;
						PI[playerid][cFuel][0] = 0;
						PI[playerid][cColor1][0]= 0;
						PI[playerid][cColor2][0]= 0;
						PI[playerid][cX][0] = 0;
						PI[playerid][cVirt][0] = 0;
						PI[playerid][cInt][0] = 0;
						PI[playerid][cY][0] = 0;
						PI[playerid][cZ][0] = 0;
						PI[playerid][cFa][0] = 0;
						for(new i; i < 14; i++) PI[playerid][cVehcoms1][i]= 0;
						strmid(PI[playerid][cNumber1], "-------", 0, strlen("-------"), 64);
						MysqlUpdatePlayerStr(playerid, "cNumber", PI[playerid][cNumber1]);
						MysqlUpdatePlayerInt(playerid, "cModel", PI[playerid][cModel][0]);
						MysqlUpdatePlayerInt(playerid, "cColor1", PI[playerid][cColor1][0]);
						MysqlUpdatePlayerInt(playerid, "cColor2", PI[playerid][cColor2][0]);
						MysqlUpdatePlayerInt(playerid, "cCost", PI[playerid][cCost][0]);
						MysqlUpdatePlayerFloat(playerid, "cX", PI[playerid][cX][0]);
						MysqlUpdatePlayerFloat(playerid, "cY", PI[playerid][cY][0]);
						MysqlUpdatePlayerFloat(playerid, "cZ", PI[playerid][cZ][0]);
						MysqlUpdatePlayerFloat(playerid, "cFa", PI[playerid][cFa][0]);
					}
				case 2:
					{
						DestroyDynamic3DTextLabel(VehicleLabel[PI[playerid][cCarId][1]]);
						SendMes(playerid, COLOR_LIGHTRED, "?? ??????? ????????? ?2, ??? ?????????? %i ??????", PI[playerid][cCost][1] / 2);
						GiveMoney(playerid, PI[playerid][cCost][1] / 2,"??????");
						DestroyVehicle(PI[playerid][cCarId][1]);
						PI[playerid][cCarId][1] = INVALID_VEHICLE_ID;
						PI[playerid][cModel][1]= 0;
						PI[playerid][cCost][1]= 0;
						PI[playerid][cLock][1]= 0;
						PI[playerid][cFuel][1] = 0;
						PI[playerid][cColor1][1]= 0;
						PI[playerid][cVirt][1] = 0;
						PI[playerid][cInt][1] = 0;
						PI[playerid][cColor2][1]= 0;
						PI[playerid][cX][1] = 0;
						PI[playerid][cY][1] = 0;
						PI[playerid][cZ][1] = 0;
						PI[playerid][cFa][1] = 0;
						for(new i; i < 14; i++) PI[playerid][cVehcoms2][i]= 0;
						strmid(PI[playerid][cNumber2], "-------", 0, strlen("-------"), 64);
						MysqlUpdatePlayerStr(playerid, "cNumber2", PI[playerid][cNumber2]);
						MysqlUpdatePlayerInt(playerid, "cModel2", PI[playerid][cModel][1]);
						MysqlUpdatePlayerInt(playerid, "cColor1_2", PI[playerid][cColor1][1]);
						MysqlUpdatePlayerInt(playerid, "cColor2_2", PI[playerid][cColor2][1]);
						MysqlUpdatePlayerInt(playerid, "cCost2", PI[playerid][cCost][1]);
						MysqlUpdatePlayerFloat(playerid, "cX2", PI[playerid][cX][1]);
						MysqlUpdatePlayerFloat(playerid, "cY2", PI[playerid][cY][1]);
						MysqlUpdatePlayerFloat(playerid, "cZ2", PI[playerid][cZ][1]);
						MysqlUpdatePlayerFloat(playerid, "cFa2", PI[playerid][cFa][1]);
					}
				case 3:
					{

						DestroyDynamic3DTextLabel(VehicleLabel[PI[playerid][cCarId][2]]);
						SendMes(playerid, COLOR_LIGHTRED, "?? ??????? ????????? ?3, ??? ?????????? %i ??????", PI[playerid][cCost][2] / 2);
						GiveMoney(playerid, PI[playerid][cCost][2] / 2,"??????");
						DestroyVehicle(PI[playerid][cCarId][2]);
						PI[playerid][cCarId][2] = INVALID_VEHICLE_ID;
						PI[playerid][cModel][2]= 0;
						PI[playerid][cCost][2]= 0;
						PI[playerid][cLock][2]= 0;
						PI[playerid][cFuel][2] = 0;
						PI[playerid][cColor1][2]= 0;
						PI[playerid][cVirt][2] = 0;
						PI[playerid][cInt][2] = 0;
						PI[playerid][cColor2][2]= 0;
						PI[playerid][cX][2] = 0;
						PI[playerid][cY][2] = 0;
						PI[playerid][cZ][2] = 0;
						PI[playerid][cFa][2] = 0;
						for(new i; i < 14; i++) PI[playerid][cVehcoms3][i]= 0;
						strmid(PI[playerid][cNumber3], "-------", 0, strlen("-------"), 64);
						MysqlUpdatePlayerStr(playerid, "cNumber3", PI[playerid][cNumber3]);
						MysqlUpdatePlayerInt(playerid, "cModel3", PI[playerid][cModel][2]);
						MysqlUpdatePlayerInt(playerid, "cColor1_3", PI[playerid][cColor1][2]);
						MysqlUpdatePlayerInt(playerid, "cColor2_3", PI[playerid][cColor2][2]);
						MysqlUpdatePlayerInt(playerid, "cCost3", PI[playerid][cCost][2]);
						MysqlUpdatePlayerFloat(playerid, "cX3", PI[playerid][cX][2]);
						MysqlUpdatePlayerFloat(playerid, "cY3", PI[playerid][cY][2]);
						MysqlUpdatePlayerFloat(playerid, "cZ3", PI[playerid][cZ][2]);
						MysqlUpdatePlayerFloat(playerid, "cFa3", PI[playerid][cFa][2]);
					}
				case 4:
					{
						DestroyDynamic3DTextLabel(VehicleLabel[PI[playerid][cCarId][3]]);
						SendMes(playerid, COLOR_LIGHTRED, "?? ??????? ????????? ?3, ??? ?????????? %i ??????", PI[playerid][cCost][3] / 2);
						GiveMoney(playerid, PI[playerid][cCost][3] / 2,"??????");
						DestroyVehicle(PI[playerid][cCarId][3]);
						PI[playerid][cCarId][3] = INVALID_VEHICLE_ID;
						PI[playerid][cModel][3]= 0;
						PI[playerid][cCost][3]= 0;
						PI[playerid][cLock][3]= 0;
						PI[playerid][cFuel][3] = 0;
						PI[playerid][cColor1][3]= 0;
						PI[playerid][cVirt][3] = 0;
						PI[playerid][cInt][3] = 0;
						PI[playerid][cColor2][3]= 0;
						PI[playerid][cX][3] = 0;
						PI[playerid][cY][3] = 0;
						PI[playerid][cZ][3] = 0;
						PI[playerid][cFa][3] = 0;
						for(new i; i < 14; i++) PI[playerid][cVehcoms4][i]= 0;
						strmid(PI[playerid][cNumber4], "-------", 0, strlen("-------"), 64);
						MysqlUpdatePlayerStr(playerid, "cNumber4", PI[playerid][cNumber4]);
						MysqlUpdatePlayerInt(playerid, "cModel4", PI[playerid][cModel][3]);
						MysqlUpdatePlayerInt(playerid, "cColor1_4", PI[playerid][cColor1][3]);
						MysqlUpdatePlayerInt(playerid, "cColor2_4", PI[playerid][cColor2][3]);
						MysqlUpdatePlayerInt(playerid, "cCost4", PI[playerid][cCost][3]);
						MysqlUpdatePlayerFloat(playerid, "cX4", PI[playerid][cX][3]);
						MysqlUpdatePlayerFloat(playerid, "cY4", PI[playerid][cY][3]);
						MysqlUpdatePlayerFloat(playerid, "cZ4", PI[playerid][cZ][3]);
						MysqlUpdatePlayerFloat(playerid, "cFa4", PI[playerid][cFa][3]);
					}
				case 5:
					{
						DestroyDynamic3DTextLabel(VehicleLabel[PI[playerid][cCarId][4]]);
						SendMes(playerid, COLOR_LIGHTRED, "?? ??????? ????????? ?3, ??? ?????????? %i ??????", PI[playerid][cCost][4] / 2);
	     				GiveMoney(playerid, PI[playerid][cCost][0] / 2,"??????");
						DestroyVehicle(PI[playerid][cCarId][4]);
						PI[playerid][cCarId][4] = INVALID_VEHICLE_ID;
						PI[playerid][cModel][4]= 0;
						PI[playerid][cCost][4]= 0;
						PI[playerid][cLock][4]= 0;
						PI[playerid][cFuel][4] = 0;
						PI[playerid][cColor1][4]= 0;
						PI[playerid][cVirt][4] = 0;
						PI[playerid][cInt][4] = 0;
						PI[playerid][cColor2][4]= 0;
						PI[playerid][cX][4] = 0;
						PI[playerid][cY][4] = 0;
						PI[playerid][cZ][4] = 0;
						PI[playerid][cFa][4] = 0;
						for(new i; i < 14; i++) PI[playerid][cVehcoms5][i]= 0;
						strmid(PI[playerid][cNumber5], "-------", 0, strlen("-------"), 64);
						MysqlUpdatePlayerStr(playerid, "cNumber5", PI[playerid][cNumber5]);
						MysqlUpdatePlayerInt(playerid, "cModel5", PI[playerid][cModel][4]);
						MysqlUpdatePlayerInt(playerid, "cColor1_5", PI[playerid][cColor1][4]);
						MysqlUpdatePlayerInt(playerid, "cColor2_5", PI[playerid][cColor2][4]);
						MysqlUpdatePlayerInt(playerid, "cCost5", PI[playerid][cCost][4]);
						MysqlUpdatePlayerFloat(playerid, "cX5", PI[playerid][cX][4]);
						MysqlUpdatePlayerFloat(playerid, "cY5", PI[playerid][cY][4]);
						MysqlUpdatePlayerFloat(playerid, "cZ5", PI[playerid][cZ][4]);
						MysqlUpdatePlayerFloat(playerid, "cFa5", PI[playerid][cFa][4]);
					 }
				   }
                }
			}

в чем проблема может быть?

 

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Для публикации сообщений создайте учётную запись или авторизуйтесь

Вы должны быть пользователем, чтобы оставить комментарий

Создать учетную запись

Зарегистрируйте новую учётную запись в нашем сообществе. Это очень просто!

Регистрация нового пользователя

Войти

Уже есть аккаунт? Войти в систему.

Войти
Авторизация  

  • Последние посетители   0 пользователей онлайн

    Ни одного зарегистрированного пользователя не просматривает данную страницу

×

Важная информация

Мы разместили cookie-файлы на ваше устройство, чтобы помочь сделать этот сайт лучше. Вы можете изменить свои настройки cookie-файлов, или продолжить без изменения настроек.