Next line problem
#1

Problem is that in Account Commands after I click Back its closes and nothing happen, It must go back to Player Commands dialog right?? As you can see //Next Button //Back Button the word else..

The only working is when I do /cd - it shows Basic Commands and that is right, If I click >> Then Player Commands will show and that's correct too, and last If I click next the Account Commands will show and that's correct. The only problem is the Back under Account Commands.

pawn Код:
CMD:cd(playerid, params[])
{
    new str[512];
    strcat(str, "Basic Commands:\n\n");
    strcat(str, "/id -- Search player ID using Player part name\n");
    strcat(str, "/pm -- Send private message to a player\n");
    ShowPlayerDialog(playerid, DIALOG_COMMANDS, DIALOG_STYLE_MSGBOX, "Commands", str, ">>", "Close");
    return 1;
}
pawn Код:
Under OnDialogResponse
if(dialogid == DIALOG_COMMANDS && response)
    {
        new str[512];
        strcat(str, "Player Commands:\n\n");
        strcat(str, "/stats -- Show specified player statistics\n");
        strcat(str, "/kill -- Suicide\n");
        ShowPlayerDialog(playerid, DIALOG_COMMANDS + 1, DIALOG_STYLE_MSGBOX, "Commands", str, ">>", "Back");
        return 1;
    }
    if(dialogid == DIALOG_COMMANDS + 1)
    {
        if(response) //Next Button
        {
            new str[256];
            strcat(str, "Account Commands:\n\n");
            strcat(str, "/register -- register for a new account\n");
            strcat(str, "/login -- login your registered account\n");
            ShowPlayerDialog(playerid, DIALOG_COMMANDS + 2, DIALOG_STYLE_MSGBOX, "Commands", str, ">>", "Back");
        }
        else //Back Button
        {
            new str[512];
            strcat(str, "Player Commands:\n\n");
            strcat(str, "/stats -- Show specified player statistics\n");
            ShowPlayerDialog(playerid, DIALOG_COMMANDS, DIALOG_STYLE_MSGBOX, "Commands", str, ">>", "Close");
        }
    }
    return 1;
}
Reply
#2

Код:
ShowPlayerDialog(playerid, DIALOG_COMMANDS, DIALOG_STYLE_MSGBOX, "Commands", str, ">>", "Close");
You didn't add the '+ 1'...
Код:
ShowPlayerDialog(playerid, DIALOG_COMMANDS + 1, DIALOG_STYLE_MSGBOX, "Commands", str, ">>", "Close");
Reply
#3

Quote:
Originally Posted by Shetch
Посмотреть сообщение
Код:
ShowPlayerDialog(playerid, DIALOG_COMMANDS, DIALOG_STYLE_MSGBOX, "Commands", str, ">>", "Close");
You didn't add the '+ 1'...
Код:
ShowPlayerDialog(playerid, DIALOG_COMMANDS + 1, DIALOG_STYLE_MSGBOX, "Commands", str, ">>", "Close");
Doesn't work. It messing the dialog..
Reply
#4

Anyone really need to fix this.. Thanks in advanced.
Reply
#5

Seems like everything in the script should work...
Maybe you have other dialogs with the same ID?
Reply
#6

Try this:

Код:
	else //Back Button
        {
            new str[512] = "Player Commands:\n\n";
            strcat(str, "/stats -- Show specified player statistics\n");
            ShowPlayerDialog(playerid, DIALOG_COMMANDS, DIALOG_STYLE_MSGBOX, "Commands", str, ">>", "Close");
        }
Reply
#7

I would check to make sure that there are no other filterscripts/gamemodes with the same dialog ids in them, otherwise try returning 0 instead of 1 at the end of OnDialogResponse.
Reply
#8

Quote:
Originally Posted by Shetch
Посмотреть сообщение
Try this:

Код:
	else //Back Button
        {
            new str[512] = "Player Commands:\n\n";
            strcat(str, "/stats -- Show specified player statistics\n");
            ShowPlayerDialog(playerid, DIALOG_COMMANDS, DIALOG_STYLE_MSGBOX, "Commands", str, ">>", "Close");
        }
After I clicked Back it show's this but it must be Basic Commands Dialog..

@clarencecuzz - i did still no luck. Do I need to make another Dialog Box?
Reply
#9

Still nothing.. After I click next in Account Commands. It close how do I add dialog box next to Account commands??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)