Dialog Quiz
#1

Hello, I have one dialog quiz when players first register, I added a DIALOG_QUIZ2 so it asks the second quiz after a player gets the first one right, I have this:

pawn Код:
#define                 DIALOG_QUIZ                             (59)
#define                 DIALOG_QUIZ2                            (60)
then I have this:

pawn Код:
if(playerVariables[extraid][pFirstLogin] >= 1) {
                    // Dialog to send player in to quiz and prevent any other code for the player from being executed, as they have to complete the quiz/tutorial first.
                    return ShowPlayerDialog(extraid, DIALOG_QUIZ, DIALOG_STYLE_LIST, "What does OOC stand for?", "Out Of Character\nOver Other Circumstances\nOut Of Crime\nOn Own Contract", "Select", "");
                }
                if(playerVariables[extraid][pFirstLogin] >= 1) {
                    // Dialog to send player in to quiz and prevent any other code for the player from being executed, as they have to complete the quiz/tutorial first.
                    return ShowPlayerDialog(extraid, DIALOG_QUIZ2, DIALOG_STYLE_LIST, "What is Metagaming?", "Playing a BETA type\nA different type of game mode\nUsing Out Of Character info In Character\nA cheat", "Select", "");
                }
And finally, this:

pawn Код:
case DIALOG_QUIZ: {
            switch(listitem) {
                case 0: {
                    SetPVarInt(playerid, "quiz", 1);
                    SendClientMessage(playerid, COLOR_YELLOW, "Brilliant! You have answered the question successfully.");
                    SetPVarInt(playerid, "quiz2", 1);
                }
                case 1, 2, 3: {
                    SendClientMessage(playerid, COLOR_LIGHTRED, "You've unfortunately failed to answer the question correctly.");
                    Kick(playerid);
                }
            }
        }
        case DIALOG_QUIZ2: {
            switch(listitem) {
                case 2: {
                    SetPVarInt(playerid, "quiz2", 1);
                    ShowPlayerDialog(playerid, DIALOG_DO_TUTORIAL, DIALOG_STYLE_MSGBOX, "Brilliant!", "You've answered the question successfully.\n\nYou'll be taken to set some character preferences in a few seconds, unless you press 'OK'.", "OK", "");
                    SetPVarInt(playerid, "tutt", SetTimerEx("initiateTutorial", 3000, false, "d", playerid));
                }
                case 0, 1, 3: {
                    SendClientMessage(playerid, COLOR_LIGHTRED, "You've unfortunately failed to answer the question correctly.");
                    Kick(playerid);
                }
            }
        }
The problem I am having is after the first quiz is answered correctly, it just says 'Brilliant! You have answered the question successfully.' and nothing else happens. Please could someone help me with this, I'll give a rep.
Reply
#2

Show another dialog ?
pawn Код:
case DIALOG_QUIZ: {
            switch(listitem) {
                case 0: {
                    SetPVarInt(playerid, "quiz", 1);
                    SendClientMessage(playerid, COLOR_YELLOW, "Brilliant! You have answered the question successfully.");
                    ShowPlayerDialog(next question);
                    SetPVarInt(playerid, "quiz2", 1);
                }
Reply
#3

Fixed, +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)