Is that code in your gamemode?
And do you have some filterscripts loaded as well?
In that case, check your filterscripts and check the OnDialogResponse callback in those filterscripts.
At the end of the callback, when no dialog has been processed there, it should hold "return 0;", like this:
pawn Код:
// This callback gets called when a player interacts with a dialog
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
// Select the proper dialog to process
switch (dialogid)
{
case DialogSupportSettings: Dialog_SupportSettings(playerid, response, listitem); // Process the SupportSettings main-menu
case DialogNewGlobConsumptionMul: Dialog_NewGlobConsumptionMul(playerid, response, inputtext); // Process the value given for a new GlobalConsumptionMul setting
case DialogNewPricePerLitre: Dialog_NewPricePerLitre(playerid, response, inputtext); // Process the value given for a new PricePerLitre setting
case DialogNewFinePerUnit: Dialog_NewFinePerUnit(playerid, response, inputtext); // Process the value given for a new FinePerUnit setting
case DialogRegister: Dialog_Register(playerid, response, inputtext); // The "Register"-dialog
case DialogLogin: Dialog_Login(playerid, response, inputtext); // The "Login"-dialog
case DialogSelectVehicleClass: Dialog_SelectVehicleClass(playerid, response, listitem); // Process the chosen vehicle-class when using the /v or /editv commands
case DialogSelectVehicle: Dialog_SelectVehicle(playerid, response, listitem); // Spawn a vehicle with /v or edit it's model-data using /editv
case DialogSelectVehicleModelData: Dialog_SelectVehicleModelData(playerid, response, listitem); // Process the chosen vehiclemodel-data to be edited
case DialogVModelNewPrice: Dialog_VModelNewPrice(playerid, response, inputtext);
case DialogVModelNewMaxFuel: Dialog_VModelNewMaxFuel(playerid, response, inputtext);
case DialogVModelNewConsumption: Dialog_VModelNewConsumption(playerid, response, inputtext);
case DialogVModelNewRefuelTime: Dialog_VModelNewRefuelTime(playerid, response, inputtext);
case DialogBuyCompany: Dialog_BuyCompany(playerid, response);
case DialogBuyCompanyAskName: Dialog_BuyCompanyAskName(playerid, response, inputtext);
case DialogInviteToCompany: Dialog_InviteToCompany(playerid, response);
case DialogCompanyData: Dialog_CompanyData(playerid, response, listitem);
case DialogCompanyLeave: Dialog_CompanyLeave(playerid, response);
}
// A filterscript should always return 0 here, otherwise the other filterscripts and the gamemode cannot process any dialog
return 0;
}
The last line MUST return 0 in filterscripts in case no dialog was processed.
If it returns 1 in a filterscript, processing dialogs stops right there and the server won't process any other dialogs from other filterscripts and the gamemode.