Showing a certain dialog after responding to a dialog
#4

Quote:
Originally Posted by dionisak0s
Посмотреть сообщение
I think I wrongly forget to write the switch cases, I want it to be like
pawn Код:
case 0:
{
    if(rank 1)
    {
        ShowPlayerDialog(etc....)
    }
    else if(rank 2)
    {
        ShowPlayerDialog(etc....)
    }
That's what I meant, I just forget to put the the switch cases.
That wouldn't work anyway, you need to use your predefined enumerators/variables that you're using to store ranks, example:

pawn Код:
switch(dialogid) // this is not necessary, but I use it sometimes
{
    case SOME_DIALOG:
    {
        if(!response) return 1; // if there is no response (esc or button 2), dialog stops here
        switch(listitem) // switching through the items on the dialog
        {
            case 0: // first item on the dialog is here
            {
                if(/*variable here, example:*/pRank[playerid] == 1) // notice that "Rank 1" will just return the error of undefined symbol 'Rank' and expected zero or something along those lines
                {
                    ShowPlayerDialog(etc. etc. etc.);
                }
                else if(/*variable here, example:*/pRank[playerid] == 2) // as above
                {
                    ShowPlayerDialog(etc. etc. etc.);
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)