Advertisement
Tectoon

[TFM] Anúncio

Oct 7th, 2015
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.15 KB | None | 0 0
  1. mapa = [[@6287039]]
  2.  
  3. function main()
  4. admin={Sagazgamer=true,Tectoon=true, Theapps=true}
  5. end
  6.  
  7. function eventNewPlayer(name)
  8. if admin[name] then
  9.         ui.addTextArea(5,"<a href='event:msg'><p align='center'><font size='12px'>Mensagem</font></p></a>", name, 10, 375, 75, 20, 0x000000, 0x324650, 0.5, true)
  10.         admin[name]={
  11.         mod=false,
  12.         sorteador=false
  13. }
  14.         end
  15. end
  16.  
  17. function eventTextAreaCallback(id, name, callback)
  18. if callback=="msg" then
  19.         ui.addPopup (9, 2, "Introduza a mensagem a enviar a todos :", name, 200, 180, 300, true)
  20.         ui.addTextArea(5,"<a href='event:msg'><font size='12px'><p align='center'>Mensagem</p></font></a>", name, 10, 375, 75, 20, 0x000000, 0x324650, 0.5, true)
  21.         ui.addTextArea(6,"<a href='event:mod'><font size='14px'><p align='center'>Modération</p></font></a>", name, 200, 265, 90, 20,0xC06F6E,0x324650,0.9,true)
  22.         ui.addTextArea(7,"<a href='event:animation'><font size='14px'><p align='center'>Sorteador</p></font></a>", name, 300, 265, 100, 20,0x000000,0x324650,0.9,true)
  23.         ui.addTextArea(8,"<a href='event:moi'><font size='14px'><p align='center'>Pvd</p></font></a>", name, 410, 265, 90, 20,0x2A6CDD,0x324650,0.9,true)
  24.         end
  25.         if callback=="mod" then
  26.                 admin[name].mod=true
  27.                 admin[name].animation=false
  28.         end
  29.         if callback=="animation" then
  30.                 admin[name].animation=true
  31.                 admin[name].mod=false
  32.         end
  33.         if callback=="moi" then
  34.                 admin[name].animation=false
  35.                 admin[name].mod=false
  36.         end
  37.   end
  38.  
  39. function eventPopupAnswer(popupid, name, answer)
  40.         if popupid==9 then
  41.                 ui.removeTextArea(6, name)
  42.                         ui.removeTextArea(7, name)
  43.                         ui.removeTextArea(8, name)
  44.         if not admin[name].animation and not admin[name].mod then
  45.                 ui.addTextArea(12,"<font size='15' color='#6CABFF'>"..name.." : "..answer.."</font> <p align='right'><font size='14px'><a</a></font></p>",nil, 5, 25, 790, 40, 1, 1, 0.8, false)
  46.                 end
  47.                 if admin[name].animation then
  48.                 ui.addTextArea(12,"<font size='15' color='#FF9610'>[Sorteador] : "..answer.."</font> <p align='right'><font size='14px'><a</a></font></p>",nil, 5, 25, 790, 40, 1, 1, 0.8, false)      
  49.                 admin[name].animation=false
  50.                 end
  51.                 if admin[name].mod then
  52.                 ui.addTextArea(12,"<font size='15' color='#ED67EA'>[Moderation] : "..answer.."</font> <p align='right'><font size='14px'><a</a></font></p>",nil, 5,25, 790, 40, 1, 1, 0.8, false)    
  53.                 admin[name].mod=false
  54.                 end
  55.         end
  56. end
  57.  
  58. tfm.exec.disableAutoShaman(true)
  59. tfm.exec.disableAutoNewGame(true)
  60. function eventPlayerDied(playerName)
  61. tfm.exec.respawnPlayer(playerName)
  62. end
  63. tfm.exec.newGame(mapa)
  64. tfm.exec.setUIMapName("Script de Anuncio")
  65.  
  66. main()
  67.  
  68. for name in pairs (tfm.get.room.playerList) do eventNewPlayer(name) end
  69.  
  70. tfm.exec.addPhysicObject(0, 400, 200, {type=12,color=math.random(0x666666, 0x777777), miceCollision=false, width=800, height=400})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement