Quiz made with dialogs
#1

I am creating a quiz for my roleplay server (It will be made in dialogs) and I am wondering how
can I detect if player has 6 or more questions correct from 10 questions !

^ Please help me, thanks for the help.

Note: I didn't made they quiz yet.

- Matej
Reply
#2

Well, When He picked the answer, do something like
CorrectAnswer == 1; (I hope you know how to make things like this completely??)
Then Go further counting up, and at the end, check it.
if(CorrectAnswer == 6)

Etc etc.
Reply
#3

Quote:
Originally Posted by DragonBlaster50
View Post
I hope you know how to make things like this completely??)
Yes I know how to make things like that !

Quote:

if(CorrectAnswer == 6)

I just don't know what to put at the end of the quiz to detect how many correct answers he gots.
I don't think that gonna work ^ !
Reply
#4

can also be something with strcmp
(( strcmp is not only command, can be everything, npc name, text or command etc.

edit: i also think if u wanna calculate how many good answers it may be something like this: correctanswers++ but i dont know that :/ wait till a professional scripter comes and keep bumping
Reply
#5

Quote:
Originally Posted by Mike_Peterson
View Post
can also be something with strcmp
(( strcmp is not only command, can be everything, npc name, text or command etc.

edit: i also think if u wanna calculate how many good answers it may be something like this: correctanswers++ but i dont know that :/ wait till a professional scripter comes and keep bumping
How can I calculate how many correct answers player has ?
Reply
#6

i just said: but i dont know that :/
so i dont know :/
Reply
#7

Add this code to the beginning of your script:
Code:
new TutorialStep[MAX_PLAYERS];
Add this code after your check of the correct answer:
Code:
TutorialStep[playerid]++;
Use this code to detect the step:
Code:
if(TutorialStep[playerid]==number)
Replace "number" with an actual number, and make sure you use that number only once. Also add an "else" in front of the "if" when you'd like to add more than one step (the if - else if structure).

For any more help I suggest you to download a script containing an tutorial, there are plenty!
Reply
#8

yeah, neoz was right so was i abit with the ++ tihng XD
look do for example this

Code:
if(TutorialStep[playerid]== 1)
{
SendClientMessage(playerid,urcolor,"You had 1/10 questions correct");
}
else if(TutorialStep[playerid]== 2)
{
SendClientMessage(playerid,urcolor,"You had 2/10 questions correct");
}
else if(TutorialStep[playerid]== 3)
{
SendClientMessage(playerid,urcolor,"You had 3/10 questions correct");
}
et cetera... so on.. You see? that should do it
Reply
#9

Quote:
Originally Posted by Mike_Peterson
View Post
yeah, neoz was right so was i abit with the ++ tihng XD
look do for example this

Code:
if(TutorialStep[playerid]== 1)
{
SendClientMessage(playerid,urcolor,"You had 1/10 questions correct");
}
else if(TutorialStep[playerid]== 2)
{
SendClientMessage(playerid,urcolor,"You had 2/10 questions correct");
}
else if(TutorialStep[playerid]== 3)
{
SendClientMessage(playerid,urcolor,"You had 3/10 questions correct");
}
et cetera... so on.. You see? that should do it
ok thanks for the help !
Reply
#10

i've pmed u something but uhh can i test ur quiz if its done
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)