02.01.2014, 19:25
I am having some weird issue with my script.
I made a quiz.. It should basically all work, but the thing is, it's not.
When it should poceed to the quiz with [pawn]SetTimer("PutPlayerInQuiz", 5000, 0); nothing happens.
Let me hand you the code.
And then under "OnDialogResponse"
I made a quiz.. It should basically all work, but the thing is, it's not.
When it should poceed to the quiz with [pawn]SetTimer("PutPlayerInQuiz", 5000, 0); nothing happens.
Let me hand you the code.
pawn Код:
SetTimer("PutPlayerInQuiz", 5000, 0);
public PutPlayerInQuiz(playerid)
{
TogglePlayerControllable(playerid, 0);
QuizStep[playerid] = 1;
ClearPlayerChat(playerid);
ShowPlayerDialog(playerid, DIALOG_QUIZ1, DIALOG_STYLE_LIST, "What does MG and PG stand for?", "MadGaming & PieGaming\nMoreGaming & PopGaming\nMetagaming & Powergaming\nMyGun & PieGun", "Answer", "");
}
pawn Код:
case DIALOG_QUIZ1:
{
if(!response) return Kick(playerid);
if(response)
{
if(listitem == 3)
{
ShowPlayerDialog(playerid, DIALOG_QUIZ2, DIALOG_STYLE_LIST, "What does OOC and IC stand for?", "Out of Camera & In Camera\nOut of Car & In Car\nOut of Camp & In Camp\nOut of Character & In Character", "Answer", "");
}
else
{
ShowPlayerDialog(playerid, DIALOG_QUIZ2, DIALOG_STYLE_LIST, "What does OOC and IC stand for?", "Out of Camera & In Camera\nOut of Car & In Car\nOut of Camp & In Camp\nOut of Character & In Character", "Answer", "");
AnswersRight[playerid] --;
}
if(AnswersRight[playerid] < 4)
{
KickWithMessage(playerid, RED, "You were kicked as you did not score enough points to pass the quiz.");
}
}
}
ca