27.10.2011, 16:10
OnDialogResponse isn't getting called in my filterscripts. I have return 1;'s at the following places in my gamemode:
The filterscript:
It worked a few weeks ago, however. I am using 0.3d.
pawn Код:
OnDialogResponse(...)
{
if(dialogid == DIALOG_LOGIN)
{
// Code
return 1;
}
if(dialogid == DIALOG_REGISTER)
{
// Code
return 1;
}
return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
SendClientMessageToAll(COLOR_RACE, "OnDialogResponse");
if(dialogid == DIALOG_CP_TYPE)
{
if(response) SetPVarInt(playerid, "race_cp_type", 0);
else SetPVarInt(playerid, "race_cp_type", 3);
ShowPlayerDialog(playerid, DIALOG_CP_SIZE, DIALOG_STYLE_INPUT, "Race CP size", "Enter the size for checkpoints (10 is usually good)", "Set", "Cancel");
return 1;
}
else if(dialogid == DIALOG_CP_SIZE && response)
{
SetPVarFloat(playerid, "race_cp_size", floatstr(inputtext));
SendClientMessage(playerid, COLOR_RACE, "Type {FFFFFF}/CP{F4A460} to create checkpoints at your current position.");
return 1;
}
return 1;
}