15.01.2014, 13:56
Hello!
I have a filterscript with this code:
And these two dialogs:
Crashes my server after I click button "OK". There is no collisions with other dialog IDs, from other scripts or gamemode. Can somebody help me, please?
I have a filterscript with this code:
Код:
//Definitions somewhere upper #define D_SALON 4441 #define D_INFO 4442 //Public OnDialogResponse public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == D_SALON) { if(!response) return 1; if(inputtext[0] == 'B') //Brak pojazdуw return 1; new strModel[5], vehicleModel, vehiclePrice; strmid(strModel, inputtext, 0, strfind(inputtext, ":", true)-1); vehicleModel = strval(strModel); vehiclePrice = GetVehiclePrice(GetPVarInt(playerid, "PQuisVeh_SalonID"), vehicleModel); if(CountPlayerVehicles(playerid) >= MAX_PLAYER_VEHICLES) ShowPlayerDialog(playerid, D_INFO, DIALOG_STYLE_MSGBOX, "Salon pojazdуw", "Nie możesz posiadać więcej pojazdуw.", "OK", ""); else if(CheckPlayerMoney(playerid) < vehiclePrice) ShowPlayerDialog(playerid, D_INFO, DIALOG_STYLE_MSGBOX, "Salon pojazdуw", "Nie stać Cię na zakup tego pojazdu.", "OK", ""); else { AddVehicle(vehicleModel, playerid); SetPlayerMoney(playerid, CheckPlayerMoney(playerid)-vehiclePrice); SendClientMessage(playerid, C_SUCCESS, "Kupiłeś pojazd! Jak najszybciej go przeparkuj używając komendy /zaparkuj"); } return 1; } return 0; }
Код:
ShowPlayerDialog(playerid, D_INFO, DIALOG_STYLE_MSGBOX, "Salon pojazdуw", "Nie możesz posiadać więcej pojazdуw.", "OK", ""); ShowPlayerDialog(playerid, D_INFO, DIALOG_STYLE_MSGBOX, "Salon pojazdуw", "Nie stać Cię na zakup tego pojazdu.", "OK", "");