Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define DIALOG_QUIZ 550
- #define DIALOG_QUIZ1 551
- #define DIALOG_QUIZ2 552
- #define DIALOG_QUIZ3 553
- #define DIALOG_QUIZ4 554
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, -1,"You will have to pass through a quiz");
- ShowPlayerDialog(playerid,DIALOG_QUIZ,DIALOG_STYLE_LIST,"What does RP stands for?",rp,"Select","Leave Game");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_QUIZ)
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- if(listitem == 0)
- {
- SendClientMessage(playerid, -1,"Wrong answer!");
- Kick(playerid);
- }
- if(listitem == 1)
- {
- SendClientMessage(playerid, -1,"That's the correct answer");
- new rp[] = " Normal Chat \n In every chat \n /b (local ooc chat) and /o (global ooc chat)";
- ShowPlayerDialog(playerid,DIALOG_QUIZ1,DIALOG_STYLE_LIST,"In which chat you can say: LOL",rp,"Select","Leave Game");
- }
- if(listitem == 2)
- {
- SendClientMessage(playerid, -1,"Wrong answer!");
- Kick(playerid);
- }
- }
- }
- if(dialogid == DIALOG_QUIZ1)
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- if(listitem == 0)
- {
- SendClientMessage(playerid, -1,"Wrong answer!");
- Kick(playerid);
- }
- if(listitem == 1)
- {
- SendClientMessage(playerid, -1,"Wrong answer!");
- Kick(playerid);
- }
- if(listitem == 2)
- {
- SendClientMessage(playerid, -1,"That's the correct answer");
- new rp[] = " /me laughs \n /me rofl \n /me wtf";
- ShowPlayerDialog(playerid, DIALOG_QUIZ2, DIALOG_STYLE_LIST,"Which /me is used correct?",rp,"Select","Leave Game");
- }
- }
- }
- if(dialogid == DIALOG_QUIZ2)
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- if(listitem == 0)
- {
- SendClientMessage(playerid, -1,"That's the correct answer");
- new rp[] = " Information Centre \n In Character \n I'm Cool";
- ShowPlayerDialog(playerid, DIALOG_QUIZ3, DIALOG_STYLE_LIST,"What IC stands for?",rp,"Select","Leave Game");
- }
- if(listitem == 1)
- {
- SendClientMessage(playerid, -1,"Wrong answer!");
- Kick(playerid);
- }
- if(listitem == 2)
- {
- SendClientMessage(playerid, -1,"Wrong answer!");
- Kick(playerid);
- }
- }
- }
- if(dialogid == DIALOG_QUIZ3)
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- if(listitem == 0)
- {
- SendClientMessage(playerid, -1,"Wrong answer");
- Kick(playerid);
- }
- if(listitem == 1)
- {
- SendClientMessage(playerid, -1,"That's the correct answer");
- new rp[] = " Out of Chat \n Out of Character \n Ow ow cool";
- ShowPlayerDialog(playerid, DIALOG_QUIZ4, DIALOG_STYLE_LIST,"What OOC stands for?",rp,"Select","Leave Game");
- }
- if(listitem == 2)
- {
- SendClientMessage(playerid, -1,"Wrong answer!");
- Kick(playerid);
- }
- }
- }
- if(dialogid == DIALOG_QUIZ4)
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- if(listitem == 0)
- {
- SendClientMessage(playerid, -1,"Wrong answer");
- Kick(playerid);
- }
- if(listitem == 1)
- {
- SendClientMessage(playerid, -1,"That's the correct answer");
- SpawnPlayer(playerid); // Or whatever you want to do after the quiz
- }
- if(listitem == 2)
- {
- SendClientMessage(playerid, -1,"Wrong answer!");
- Kick(playerid);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement