11.02.2011, 14:03
There are return 0 for individual dialog responses this is what is in the end of dialogresponse what should i edit here?
Код:
if(dialogid == UPGRADEMENU6) //misc list { if(response) { switch(listitem) { case 0: { if(PlayerInfo[playerid][pCash] >= 50000) { PlayerInfo[playerid][hAlarmSystem] = 1; MiscPriceTemp[playerid] = MiscPriceTemp[playerid]+50000; SendClientMessage(playerid, COLOR_YELLOW, "You have ordered an alarm system to be installed for $50,000."); } else { SendClientMessage(playerid, COLOR_GREY, " You don't have the cash for that !"); } //alarm } case 1: { if(PlayerInfo[playerid][pCash] >= 10000) { SendClientMessage(playerid, COLOR_GREY, " Out of Stock !"); } else { SendClientMessage(playerid, COLOR_GREY, " You don't have the cash for that !"); } //2x nos } case 2: { if(PlayerInfo[playerid][pCash] >= 35000) { SendClientMessage(playerid, COLOR_GREY, " Out of Stock !"); } else { SendClientMessage(playerid, COLOR_GREY, " You don't have the cash for that !"); } //6x nos } case 3: { if(PlayerInfo[playerid][pCash] >= 35000) { SendClientMessage(playerid, COLOR_GREY, " Out of Stock !"); } else { SendClientMessage(playerid, COLOR_GREY, " You don't have the cash for that !"); } //license plate } case 4: { if(PlayerInfo[playerid][pCash] >= 15000) { PlayerInfo[playerid][hVehLock] = 1; MiscPriceTemp[playerid] = MiscPriceTemp[playerid]+15000; SendClientMessage(playerid, COLOR_YELLOW, "You have ordered a vehicle lock for $15,000."); } else { SendClientMessage(playerid, COLOR_GREY, " You don't have the cash for that !"); } //vehicle lock } } } if(PlayerInfo[playerid][pCash] >= MiscPriceTemp[playerid]) { new string[126]; format(string, sizeof(string), "You have bought a misc. item for $%d", MiscPriceTemp[playerid]); SendClientMessage(playerid, COLOR_YELLOW, string); PlayerInfo[playerid][pCash] -= MiscPriceTemp[playerid]; GivePlayerMoney(playerid, -MiscPriceTemp[playerid]); MiscPriceTemp[playerid] = 0; OnPlayerSave(playerid); return 1; } } return 0; }