Advertisement
Tectoon

[TFM] Map,Time para Admins

Sep 29th, 2015
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.33 KB | None | 0 0
  1. admin =         {   "Tectoon", "Theapps", "Sagazgamer" }    -- Remplacez "Pseudo" par "Votre pseudo"
  2.  
  3. aff =       {   param = {} , param = {}  }
  4.  
  5. for k, pseudo in pairs(admin) do
  6.         ui.addTextArea (1, "<p align='center'><b><a href='event:time'>time</a></b></p>", pseudo, 60, 30, 35, 20, 0x324650, 0x324650, 0.75, true)
  7.         ui.addTextArea (4, "<p align='center'><b><a href='event:map'>Mapa</a></b></p>", pseudo, 10, 30, 35, 20, 0x324650, 0x324650, 0.5, true)
  8.         for l, m in pairs ( aff ) do
  9.             aff[l][pseudo] = false
  10.  
  11.         end
  12. end
  13.  
  14. function eventTextAreaCallback(id, source, callback)
  15.  
  16.         if callback == 'time' then
  17.    
  18.             ui.addPopup (0, 2, "Tempo para definir:", source, 10, 70, 150, true)
  19.    
  20.    
  21.         elseif callback == 'map' then  
  22.  
  23.             ui.addPopup (1, 2, "Código do Mapa::", source, 10, 70, 150, true)
  24.  
  25.         elseif callback == 'parametre' then
  26.  
  27.             if aff["param"][source] == false then
  28.                 affParam( source )
  29.             else
  30.                 effParam( source )
  31.             end
  32.    
  33.  
  34.         elseif parametre[callback] ~= nil then
  35.  
  36.             paraGestion(callback,  source )
  37.             ui.updateTextArea (id, callback .. ": <a href='event:" .. callback .. "'>" .. B(parametre[callback]) .. "</a>", source )
  38.         end
  39.    
  40. end
  41.  
  42. function eventPopupAnswer (id, playerName, answer)
  43.  
  44.         if id == 0 then
  45.             tfm.exec.setGameTime(answer, true)
  46.  
  47.         elseif id == 1 then
  48.             tfm.exec.newGame(answer)
  49.     end
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement