Advertisement
Guest User

Untitled

a guest
Sep 13th, 2011
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.33 KB | None | 0 0
  1. #define DIALOG_QUIZ 550
  2. #define DIALOG_QUIZ1 551
  3. #define DIALOG_QUIZ2 552
  4. #define DIALOG_QUIZ3 553
  5. #define DIALOG_QUIZ4 554
  6.  
  7.  
  8.  
  9. public OnPlayerConnect(playerid)
  10. {
  11.     SendClientMessage(playerid, -1,"You will have to pass through a quiz");
  12.     ShowPlayerDialog(playerid,DIALOG_QUIZ,DIALOG_STYLE_LIST,"What does RP stands for?",rp,"Select","Leave Game");
  13.     return 1;
  14. }
  15.  
  16. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  17. {
  18.     if(dialogid == DIALOG_QUIZ)
  19.     {
  20.         if(!response) return Kick(playerid);
  21.         if(response)
  22.         {
  23.             if(listitem == 0)
  24.             {
  25.                 SendClientMessage(playerid, -1,"Wrong answer!");
  26.                 Kick(playerid);
  27.             }
  28.             if(listitem == 1)
  29.             {
  30.                 SendClientMessage(playerid, -1,"That's the correct answer");
  31.                 new rp[] = " Normal Chat \n In every chat \n /b (local ooc chat) and /o (global ooc chat)";
  32.                 ShowPlayerDialog(playerid,DIALOG_QUIZ1,DIALOG_STYLE_LIST,"In which chat you can say: LOL",rp,"Select","Leave Game");
  33.             }
  34.             if(listitem == 2)
  35.             {
  36.                 SendClientMessage(playerid, -1,"Wrong answer!");
  37.                 Kick(playerid);
  38.             }
  39.         }
  40.     }
  41.     if(dialogid == DIALOG_QUIZ1)
  42.     {
  43.         if(!response) return Kick(playerid);
  44.         if(response)
  45.         {
  46.             if(listitem == 0)
  47.             {
  48.                 SendClientMessage(playerid, -1,"Wrong answer!");
  49.                 Kick(playerid);
  50.             }
  51.             if(listitem == 1)
  52.             {
  53.                 SendClientMessage(playerid, -1,"Wrong answer!");
  54.                 Kick(playerid);
  55.             }
  56.             if(listitem == 2)
  57.             {
  58.                 SendClientMessage(playerid, -1,"That's the correct answer");
  59.                 new rp[] = " /me laughs \n /me rofl \n /me wtf";
  60.                 ShowPlayerDialog(playerid, DIALOG_QUIZ2, DIALOG_STYLE_LIST,"Which /me is used correct?",rp,"Select","Leave Game");
  61.             }
  62.         }
  63.     }
  64.     if(dialogid == DIALOG_QUIZ2)
  65.     {
  66.         if(!response) return Kick(playerid);
  67.         if(response)
  68.         {
  69.             if(listitem == 0)
  70.             {
  71.                 SendClientMessage(playerid, -1,"That's the correct answer");
  72.                 new rp[] = " Information Centre \n In Character \n I'm Cool";
  73.                 ShowPlayerDialog(playerid, DIALOG_QUIZ3, DIALOG_STYLE_LIST,"What IC stands for?",rp,"Select","Leave Game");
  74.             }
  75.             if(listitem == 1)
  76.             {
  77.                 SendClientMessage(playerid, -1,"Wrong answer!");
  78.                 Kick(playerid);
  79.             }
  80.             if(listitem == 2)
  81.             {
  82.                 SendClientMessage(playerid, -1,"Wrong answer!");
  83.                 Kick(playerid);
  84.             }
  85.         }
  86.     }
  87.     if(dialogid == DIALOG_QUIZ3)
  88.     {
  89.         if(!response) return Kick(playerid);
  90.         if(response)
  91.         {
  92.             if(listitem == 0)
  93.             {
  94.                 SendClientMessage(playerid, -1,"Wrong answer");
  95.                 Kick(playerid);
  96.             }
  97.             if(listitem == 1)
  98.             {
  99.                 SendClientMessage(playerid, -1,"That's the correct answer");
  100.                 new rp[] = " Out of Chat \n Out of Character \n Ow ow cool";
  101.                 ShowPlayerDialog(playerid, DIALOG_QUIZ4, DIALOG_STYLE_LIST,"What OOC stands for?",rp,"Select","Leave Game");
  102.             }
  103.             if(listitem == 2)
  104.             {
  105.                 SendClientMessage(playerid, -1,"Wrong answer!");
  106.                 Kick(playerid);
  107.             }
  108.         }
  109.     }
  110.     if(dialogid == DIALOG_QUIZ4)
  111.     {
  112.         if(!response) return Kick(playerid);
  113.         if(response)
  114.         {
  115.             if(listitem == 0)
  116.             {
  117.                 SendClientMessage(playerid, -1,"Wrong answer");
  118.                 Kick(playerid);
  119.             }
  120.             if(listitem == 1)
  121.             {
  122.                 SendClientMessage(playerid, -1,"That's the correct answer");
  123.                 SpawnPlayer(playerid); // Or whatever you want to do after the quiz
  124.             }
  125.             if(listitem == 2)
  126.             {
  127.                 SendClientMessage(playerid, -1,"Wrong answer!");
  128.                 Kick(playerid);
  129.             }
  130.     }
  131.     return 1;
  132. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement