Manacer

Music'Attente 0.1

May 9th, 2014
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.45 KB | None | 0 0
  1. timer = 999
  2. music = {}
  3. ui.addPopup(5,0,"<p align='center'><font color='#88FEBF' size='16'>Utilitaire - Music'Attente</font><br><br><font size='14'>Tape <font color='#ED67EA' size='14'>!music</font> pour voir la liste d'attente des musique<br><font color='#ED67EA' size='14'>!add</font> pour ajouter une musique en attente<br><font color='#ED67EA' size='14'>!ok</font> pour relancer le chrono, actionner le seulement quand vous avez mis votre musique.<br><br><font color='#88FEBF' size='11'>N'hésitez pas à reload le module quand la liste est full",name,200,120,400)
  4.  
  5. function eventChatCommand(name,command) -- A partir de la il y'a les commandes
  6.   if command == "music" then
  7.          local str = "<p align='center'><font color='#5BD1C5' size='14'><b>Liste des musiques en attente :</b></font></p>"
  8.          str = str .. "<br><font color='#F4F19A' size='11'><b>" .. table.concat(music,'\n') .. "</b></font>"
  9.          ui.addPopup(1004,0, str, name,200,100,400)
  10.    
  11.     end
  12.          
  13.   if command == "add" then
  14.   ui.addPopup(10,2,"<p align='center'><b>Entrer le nom de la musique que vous allez mettre (exemple : Vamos à la playa) ET VOTRE PSEUDO <br>(Merci de reserver qu'une musique par personne).</p></b>",name,300,200,200)
  15.   end
  16.   if command == "ok" then
  17.   timer = 0
  18.   end
  19.   end
  20.  
  21. function eventPopupAnswer(idpopup, name, answer)
  22.         if idpopup==10 then
  23.             table.insert(music, answer)
  24.                   ui.addPopup(4, 0, "<font color='#5BD1C5' size='15'>• [<b>"..name.."</b>] ajoute :</font><font color='#F3F38D' size='13'> "..answer.." </font><font color='#5BD1C5' size='13'>dans la liste d'attente</font>", nil, 300, 140, 325)
  25.                   timer = 0
  26.                  
  27. end
  28.         if idpopup==11 then
  29.                   ui.addPopup(4, 0, "<font color='#5BD1C5' size='15'>La musique de <b>"..name.."</b> est fini vous pouvez passer la prochaine musique, de la liste.", nil, 300, 140, 325)
  30.                  
  31. end
  32. end
  33.  
  34. function eventLoop(currentTime, timeRemaining)
  35.   timer = timer + 0.5
  36.   if timer==191 then
  37.     ui.addTextArea(2, "<font size='20'>0</font>", all, 380, 110,nil,nil,1234564444444499999666565)
  38.     ui.addPopup(101, 0, "<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>", all, -1000, -1000, 1000000)
  39.     ui.addPopup(1575, 3, "<p align='center'><font color='#FA7C7C' size='15'><b>~ Prochaine musique.<br><br><font color='#FFFFF' size='12'>La map revient dans 3 secondes !</b></font></p>", name, 300, 150, 500)  end
  40.   if timer==194 then
  41.   ui.addPopup(101, 0, "ENLEVE", nil, 3000000, 14000000, 325)
  42.   ui.addPopup(1575, 3, "ENLEVE", nil, 3000000, 14000000, 325)
  43.   timer = 999
  44.   end
  45.   if timer==1 then
  46.     ui.addTextArea(2, "<font size='20'><br> <b>180</b> ...</font>", all, 380, 110,nil,nil)
  47.   end
  48.   if timer==11 then
  49.     ui.addTextArea(2, "<font size='20'>170</font>", all, 380, 110,nil,nil)
  50.         end
  51.   if timer==21 then
  52.     ui.addTextArea(2, "<font size='20'>160</font>", all, 380, 110,nil,nil)
  53.         end
  54.   if timer==31 then
  55.     ui.addTextArea(2, "<font size='20'>150</font>", all, 380, 110,nil,nil)
  56.         end
  57.   if timer==41 then
  58.     ui.addTextArea(2, "<font size='20'>140</font>", all, 380, 110,nil,nil)
  59.         end
  60.   if timer==51 then
  61.     ui.addTextArea(2, "<font size='20'>130</font>", all, 380, 110,nil,nil)
  62.         end
  63.   if timer==61 then
  64.     ui.addTextArea(2, "<font size='20'>120</font>", all, 380, 110,nil,nil)
  65.         end
  66.   if timer==71 then
  67.     ui.addTextArea(2, "<font size='20'>110</font>", all, 380, 110,nil,nil)
  68.         end
  69.   if timer==81 then
  70.     ui.addTextArea(2, "<font size='20'>100</font>", all, 380, 110,nil,nil)
  71.         end
  72.   if timer==91 then
  73.     ui.addTextArea(2, "<font size='20'>90</font>", all, 380, 110,nil,nil)
  74.         end
  75.   if timer==111 then
  76.     ui.addTextArea(2, "<font size='20'>80</font>", all, 380, 110,nil,nil)
  77.         end
  78.   if timer==121 then
  79.     ui.addTextArea(2, "<font size='20'>70</font>", all, 380, 110,nil,nil)
  80.         end
  81.   if timer==131 then
  82.     ui.addTextArea(2, "<font size='20'>60</font>", all, 380, 110,nil,nil)
  83.         end
  84.   if timer==141 then
  85.     ui.addTextArea(2, "<font size='20'>50</font>", all, 380, 110,nil,nil)
  86.         end
  87.   if timer==151 then
  88.     ui.addTextArea(2, "<font size='20'>40</font>", all, 380, 110,nil,nil)
  89.         end
  90.   if timer==161 then
  91.     ui.addTextArea(2, "<font size='20'>30</font>", all, 380, 110,nil,nil)
  92.         end
  93.   if timer==171 then
  94.     ui.addTextArea(2, "<font size='20'>20</font>", all, 380, 110,nil,nil)
  95.         end
  96.   if timer==181 then
  97.     ui.addTextArea(2, "<font size='20'>10</font>", all, 380, 110,nil,nil,1234564444467495757)
  98.         end
  99.   if timer==182 then
  100.     ui.addTextArea(2, "<font size='20'>9</font>", all, 380, 110,nil,nil,1234564444467495757)
  101.         end
  102.   if timer==183 then
  103.     ui.addTextArea(2, "<font size='20'>8</font>", all, 380, 110,nil,nil,1234564444467495757)
  104.         end
  105.   if timer==184 then
  106.     ui.addTextArea(2, "<font size='20'>7</font>", all, 380, 110,nil,nil,1234564444467495757)
  107.         end
  108.   if timer==185 then
  109.     ui.addTextArea(2, "<font size='20'>6</font>", all, 380, 110,nil,nil,1234564444467495757)
  110.         end
  111.   if timer==186 then
  112.     ui.addTextArea(2, "<font size='20'>5</font>", all, 380, 110,nil,nil,1234564444467495757)
  113.         end
  114.   if timer==187 then
  115.     ui.addTextArea(2, "<font size='20'>4</font>", all, 380, 110,nil,nil,1234564444467495757)
  116.         end
  117.   if timer==188 then
  118.     ui.addTextArea(2, "<font size='20'>3</font>", all, 380, 110,nil,nil,1234564444467495757)
  119.         end
  120.   if timer==189 then
  121.     ui.addTextArea(2, "<font size='20'>2</font>", all, 380, 110,nil,nil,1234564444467495757)
  122.         end
  123.   if timer==190 then
  124.     ui.addTextArea(2, "<font size='20'>1</font>", all, 380, 110,nil,nil,1234564444467495757)
  125.         end
  126.   if timer==999 then
  127.   ui.addTextArea(2, "", all, 380, 110,nil,nil,1234564444467495757)
  128. end
  129. end
Advertisement
Add Comment
Please, Sign In to add comment