PDA

Просмотр полной версии : [Вопрос] Проблемма с тюнингом



Andrik851
12.02.2019, 15:43
Добрый день помогите пожалуйста у меня такая проблема имеется система тюнинга все работает нормально сохраняется но один минус во время установки дисков игра зависает напрочь после перезахода тюнинг кроме дисков установлен а вот с ними проблемма

код диалога установки дисков


case D_CTO+6: // CTO
{
if(response)
{
new c = GetPlayerVehicleID(playerid);
if(IsAPlane(c) || IsABoat(c) || IsAMoped(c))return ShowSTODialog(playerid);
new i = GetPVarInt(playerid,"CTObizzid");
new till = BizzInfo[i][bTill];
switch(listitem)
{
case 0:
{
if(GetMoney(playerid) < till*60) return SendClientMessage(playerid, COLOR_GREY, "Недостаточно средств!"),ShowSTODialog(playerid);
SendMes(playerid,COLOR_WHITE,"Вы поставили диски Shadow, их стоимость %d руб.", till*60);
AddVehicleComponent(c,1073);
SetPVarInt(playerid,"PriceCTO",till*60);
SetPVarInt(playerid,"ComponentCTO",1073);
SetPVarInt(playerid,"ProductCTO",60);
format(string,128,"Стоимость этой запчасти: %d\nВы надумали с покупкой?",till*60);
ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{66CC00}Подтверждение покупки",string,"Купить","Отмена");
}
case 1:
{
if(GetMoney(playerid) < till*79) return SendClientMessage(playerid, COLOR_GREY, "Недостаточно средств!"),ShowSTODialog(playerid);
SendMes(playerid,COLOR_WHITE,"Вы поставили диски Mega, их стоимость %d руб.", till*79);
AddVehicleComponent(c,1074);
SetPVarInt(playerid,"PriceCTO",till*79);
SetPVarInt(playerid,"ComponentCTO",1074);
SetPVarInt(playerid,"ProductCTO",79);
format(string,128,"Стоимость этой запчасти: %d\nВы надумали с покупкой?",till*79);
ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{66CC00}Подтверждение покупки",string,"Купить","Отмена");
}
case 2:
{
if(GetMoney(playerid) < till*53) return SendClientMessage(playerid, COLOR_GREY, "Недостаточно средств!"),ShowSTODialog(playerid);
SendMes(playerid,COLOR_WHITE,"Вы поставили диски Wires, их стоимость %d руб.", till*53);
AddVehicleComponent(c,1076);
SetPVarInt(playerid,"PriceCTO",till*53);
SetPVarInt(playerid,"ComponentCTO",1076);
SetPVarInt(playerid,"ProductCTO",53);
format(string,128,"Стоимость этой запчасти: %d\nВы надумали с покупкой?",till*53);
ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{66CC00}Подтверждение покупки",string,"Купить","Отмена");
}
case 3:
{
if(GetMoney(playerid) < till*73) return SendClientMessage(playerid, COLOR_GREY, "Недостаточно средств!"),ShowSTODialog(playerid);
SendMes(playerid,COLOR_WHITE,"Вы поставили диски Classic, их стоимость %d руб.", till*73);
AddVehicleComponent(c,1077);
SetPVarInt(playerid,"PriceCTO",till*73);
SetPVarInt(playerid,"ComponentCTO",1077);
SetPVarInt(playerid,"ProductCTO",73);
format(string,128,"Стоимость этой запчасти: %d\nВы надумали с покупкой?",till*73);
ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{66CC00}Подтверждение покупки",string,"Купить","Отмена");
}
case 4:
{
if(GetMoney(playerid) < till*93) return SendClientMessage(playerid, COLOR_GREY, "Недостаточно средств!"),ShowSTODialog(playerid);
SendMes(playerid,COLOR_WHITE,"Вы поставили диски Twist, их стоимость %d руб.", till*93);
AddVehicleComponent(c,1078);
SetPVarInt(playerid,"PriceCTO",till*93);
SetPVarInt(playerid,"ComponentCTO",1078);
SetPVarInt(playerid,"ProductCTO",93);
format(string,128,"Стоимость этой запчасти: %d\nВы надумали с покупкой?",till*93);
ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{66CC00}Подтверждение покупки",string,"Купить","Отмена");
}
case 5:
{
if(GetMoney(playerid) < till*42) return SendClientMessage(playerid, COLOR_GREY, "Недостаточно средств!"),ShowSTODialog(playerid);
SendMes(playerid,COLOR_WHITE,"Вы поставили диски Grove, их стоимость %d руб.", till*42);
AddVehicleComponent(c,1081);
SetPVarInt(playerid,"PriceCTO",till*42);
SetPVarInt(playerid,"ComponentCTO",1081);
SetPVarInt(playerid,"ProductCTO",42);
format(string,128,"Стоимость этой запчасти: %d\nВы надумали с покупкой?",till*42);
ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{66CC00}Подтверждение покупки",string,"Купить","Отмена");
}
case 6:
{
if(GetMoney(playerid) < till*100) return SendClientMessage(playerid, COLOR_GREY, "Недостаточно средств!"),ShowSTODialog(playerid);
SendMes(playerid,COLOR_WHITE,"Вы поставили диски Atomic, их стоимость %d руб.", till*100);
AddVehicleComponent(c,1085);
SetPVarInt(playerid,"PriceCTO",till*100);
SetPVarInt(playerid,"ComponentCTO",1085);
SetPVarInt(playerid,"ProductCTO",100);
format(string,128,"Стоимость этой запчасти: %d\nВы надумали с покупкой?",till*100);
ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{66CC00}Подтверждение покупки",string,"Купить","Отмена");
}
case 7:
{
if(GetMoney(playerid) < till*500) return SendClientMessage(playerid, COLOR_GREY, "Недостаточно средств!"),ShowSTODialog(playerid);
if(PlayerInfo[playerid][pVIP] == 0) return SendClientMessage(playerid, COLOR_GREY, "Для покупки этих колес требуется VIP аккаунт (В РАЗРАБОТКЕ)!"), ShowSTODialog(playerid);
SendMes(playerid,COLOR_WHITE,"Вы поставили диски Dollar for Premium, их стоимость %d руб.", till*500);
AddVehicleComponent(c,1083);
SetPVarInt(playerid,"PriceCTO",till*500);
SetPVarInt(playerid,"ComponentCTO",1083);
SetPVarInt(playerid,"ProductCTO",500);
format(string,128,"Стоимость этой запчасти: %d\nВы надумали с покупкой?",till*500);
ShowPlayerDialog(playerid,D_CTO+12,DIALOG_STYLE_MSGBOX,"{66CC00}Подтверждение покупки",string,"Купить","Отмена");
}
}
}
else ShowSTODialog(playerid);
}

Andrik851
14.02.2019, 14:05
проблемму сам решил можно закрывать тему