Quote:
Originally Posted by Yvax
pawn Код:
//command ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Test", "Test\r\nTest2", "Ok", "Close"); //OnDialogResponse if(dialogid == 1) { if(response) { if(listitem == 0) { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Test11", "Test111test111string", "Ok", "Cancel"); } if(listitem == 1) { ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Test11", "Test111tasdaest111string", "Ok", "Cancel"); } } }
It just shows the first dialog when i execute the command and then if i click an option nothing happens.This also happens with other dialogs.The printf returns nothing(Nothing is printed in the server console)
|
Commands aren't with Dialogs
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/command", true))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Test", "Test\nTest2", "Select", "Cancel");
return 1;
}
return 0;
}
And if you are using it on gamemode
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1) {
if(response) {
if(listitem == 0) {
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Test11", "Test111test111string", "Ok", "Cancel");
}
if(listitem == 1) {
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Test11", "Test111tasdaest111string", "Ok", "Cancel");
}
}
}
//More
return 1;
}
If else on FS
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1) {
if(response) {
if(listitem == 0) {
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Test11", "Test111test111string", "Ok", "Cancel");
}
if(listitem == 1) {
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Test11", "Test111tasdaest111string", "Ok", "Cancel");
}
}
}
//More
return 0;
}