#1

Can someone helpme with this if a player chooses a woring answer server restarts

pawn Код:
{
        case DIALOG_QUIZ: // If first dialog shows up
        {
            if(!response) return Kick(playerid); // If he click "Leave " he will be kicked.
            if(response) // If he click first button
            {
                switch(listitem) // We switch the available answers
                {
                    case 0:// If he choose first answer, wich is: Real Pussy
                    {

                        QuizAnswers[playerid] += 1; // His quiz answers will be increased with 1 point.
                        ShowPlayerDialog(playerid,DIALOG_QUIZ1,DIALOG_STYLE_LIST,"Metagaming is...","...Using OOC for IC Purpose.\n...Both of them. \n...Using IC for OOC purpose.","Select","Quit");
                        // Second question will show up
                    }
                    case 1: // If he choose 2nd answers, which is: Role Play (correct one)
                    {
                         // He will get a message that he answered correct
                       ShowPlayerDialog(playerid,DIALOG_QUIZ1,DIALOG_STYLE_LIST,"Metagaming is...","...Using OOC for IC Purpose.\n...Both of them. \n...Using IC for OOC purpose.","Select","Quit");
                        // Second question will show up
                    }
                    case 2:
                    {
                        SendClientMessage(playerid, -1,"Wrong answer!"); // He will get a message that he answered
                        QuizAnswers[playerid] += 1; // His quiz answers will be increased with 1 point.
                        ShowPlayerDialog(playerid,DIALOG_QUIZ1,DIALOG_STYLE_LIST,"Metagaming is...","...Using OOC for IC Purpose.\n...Both of them. \n...Using IC for OOC purpose.","Select","Quit");
                        // Second question will show up
                    }
                }
            }
        }
        case DIALOG_QUIZ1: // If second dialog shows up
        {
            if(!response) return Kick(playerid); // If he press second button he get kicked
            if(response) // If he press first button
            {
                switch(listitem) // We switch the available answers
                {
                    case 0: // If he choose first answer wich is: Yes
                    {

                        QuizAnswers[playerid] += 1; // His quiz answers will be increased with 1 point.
                        ShowPlayerDialog(playerid, DIALOG_QUIZ2, DIALOG_STYLE_LIST,"Are you allowed to driveby?","Only as a passanger\nNo,you get punished for that.\nOnly if you are roleplaying as a human.","Select","Quit");
                        // Next dialog will show up
                    }
                    case 1: // If he choose first answer wich is: No, it's a NON-RP word (correct one)
                    {
                         // He will get a message that he answered correct
                        ShowPlayerDialog(playerid, DIALOG_QUIZ2, DIALOG_STYLE_LIST,"Are you allowed to driveby?","Only as a passanger\nNo,you get punished for that.\nOnly if you are roleplaying as a human.","Select","Quit");
                        // Next dialog will show up
                    }
                    case 2:
                    {

                        QuizAnswers[playerid] += 1; // His quiz answers will be increased with 1 point.
                        ShowPlayerDialog(playerid, DIALOG_QUIZ2, DIALOG_STYLE_LIST,"Are you allowed to driveby?","Only as a passanger\nNo,you get punished for that.\nOnly if you are roleplaying as a human.","Select","Quit");
                        // Next dialog will show up
                    }
                }
            }
        }
        case DIALOG_QUIZ2: // If 3rd dialog shows up
        {
            if(!response) return Kick(playerid); // If he click second button he get kicked
            if(response) // If he click first button
            {
                switch(listitem) // We switch the available answers
                {
                    case 0: // If he choose first answer wich is: /me laugs (correct one)
                    {

                        ShowPlayerDialog(playerid, DIALOG_QUIZ3, DIALOG_STYLE_LIST,"What IC stands for?","Inner Characteristic \nIn Character\nInside Class","Select","Quit");
                        // Next dialog will show up
                    }
                    case 1:
                    {

                        QuizAnswers[playerid] += 1; // His quiz answers will be increased with 1 point.
                        ShowPlayerDialog(playerid, DIALOG_QUIZ3, DIALOG_STYLE_LIST,"What IC stands for?","Inner Characteristic \nIn Character\nInside Class","Select","Quit");
                        // Next dialog will show up
                    }
                    case 2:
                    {

                 QuizAnswers[playerid] += 1; // His quiz answers will be increased with 1 point.
                 ShowPlayerDialog(playerid, DIALOG_QUIZ3, DIALOG_STYLE_LIST,"What IC stands for?","Inner Characteristic \nIn Character\nInside Class","Select","Quit");
                        // Next dialog will show up
                    }
                }
                if(QuizAnswers[playerid] >= 3) // If he reached 3 wrong answers
                {
                    SendClientMessage(playerid, -1,"Sorry mate, you answered 3 times wrong.Maybe another time");
                   
                }
            }
        }
        case DIALOG_QUIZ3: // If 4rd dialog shows up
        {
            if(!response) return Kick(playerid); // If he click second button he get kicked
            if(response) // If he click first button
            {
                switch(listitem) // We switch the available answers
                {
                    case 0: // If he choose first answer wich is: Information Centre
                    {

                        QuizAnswers[playerid] += 1; // His quiz answers will be increased with 1 point.
                        ShowPlayerDialog(playerid, DIALOG_QUIZ4, DIALOG_STYLE_LIST,"Deathmatching is attempting to kill another player...","...Who is trying to kill you.\n...Whithout a good roleplay reason.\nWith a good roleplay reason.","Select","Quit");
                        // Next dialog will show up
                    }
                    case 1: // If he choose first answer wich is: In Character (correct one)
                    {

                         ShowPlayerDialog(playerid, DIALOG_QUIZ4, DIALOG_STYLE_LIST,"Deathmatching is attempting to kill another player...","...Who is trying to kill you.\n...Whithout a good roleplay reason.\nWith a good roleplay reason.","Select","Quit");
                        // Next dialog will show up
                    }
                    case 2: // If he choose first answer wich is: I'm Cool
                    {

                        QuizAnswers[playerid] += 1; // His quiz answers will be increased with 1 point.
                        ShowPlayerDialog(playerid, DIALOG_QUIZ4, DIALOG_STYLE_LIST,"Deathmatching is attempting to kill another player...","...Who is trying to kill you.\n...Whithout a good roleplay reason.\nWith a good roleplay reason.","Select","Quit");
                        // Next dialog will show up
                    }
                }
                if(QuizAnswers[playerid] >= 3) // If he reached 3 wrong answers or more
                {

                 
                }
            }
        }
        case DIALOG_QUIZ4: // If 5 dialog shows up
        {
            if(!response) return Kick(playerid); // If he click second button he get kicked
            if(response) // If he click first button
            {
                switch(listitem) // We switch the available answers
                {
                    case 0: // If he choose first answers wich is: Out of Chat
                    {

                        QuizAnswers[playerid] += 1; // His quiz answers will be increased with 1 point.
                    }
                    case 1: // If he choose second answers wich is: Out of Character (correct one)
                    {

                    }
                    case 2: // If he choose 3rd answer wich is: Ow ow cool
                    {

                        QuizAnswers[playerid] += 1; // His quiz answers will be increased with 1 point.
                    }
                }
                if(QuizAnswers[playerid] >= 2) // If he reached 3 wrong answers or more
                {
                    Kick(playerid); // He will be kicked
                }
                else // If he didn't have at least 3 wrong answers
                {
                   
                    ShowDialog(playerid, 1, DIALOG_PASS, "Register","Congratulation's,\nYou have passed the Roleplay test!\nYou can now register your account,\nEnter the desired password:", "Register", "Exit");
                    //  thAftere quiz is finish,the player will be spawned, you can change here.
                }
            }

    return 1;
}
Reply
#2

SendClientMessage(playerid, -1.);
Yeah that won't work much, also change the QuizAnswers[playerid] += 1; to QuizAnswers[playerid]++;
Hope it helps.
Reply
#3

Dude it starts giveing me error
Код:
C:\Users\Osman Ali\Desktop\COS-RP.pwn(4423) : error 001: expected token: ";", but found "-integer value-"
C:\Users\Osman Ali\Desktop\COS-RP.pwn(4423) : warning 215: expression has no effect
C:\Users\Osman Ali\Desktop\COS-RP.pwn(4436) : error 001: expected token: ";", but found "-integer value-"
C:\Users\Osman Ali\Desktop\COS-RP.pwn(4436) : warning 215: expression has no effect
C:\Users\Osman Ali\Desktop\COS-RP.pwn(4453) : error 001: expected token: ";", but found "-integer value-"
C:\Users\Osman Ali\Desktop\COS-RP.pwn(4453) : warning 215: expression has no effect
C:\Users\Osman Ali\Desktop\COS-RP.pwn(4466) : error 001: expected token: ";", but found "-integer value-"
C:\Users\Osman Ali\Desktop\COS-RP.pwn(4466) : warning 215: expression has no effect
C:\Users\Osman Ali\Desktop\COS-RP.pwn(4496) : error 001: expected token: ";", but found "-integer value-"
C:\Users\Osman Ali\Desktop\COS-RP.pwn(4496) : warning 215: expression has no effect
C:\Users\Osman Ali\Desktop\COS-RP.pwn(4518) : error 001: expected token: ";", but found "-integer value-"
C:\Users\Osman Ali\Desktop\COS-RP.pwn(4518) : warning 215: expression has no effect
C:\Users\Osman Ali\Desktop\COS-RP.pwn(4531) : error 001: expected token: ";", but found "-integer value-"
C:\Users\Osman Ali\Desktop\COS-RP.pwn(4531) : warning 215: expression has no effect
C:\Users\Osman Ali\Desktop\COS-RP.pwn(4577) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
Reply
#4

I fixed errors it still got same problem
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)