Boeing747-8

#bombdeliver ui

Aug 6th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.90 KB | None | 0 0
  1. roles={"bomber","protector"}
  2. data={}
  3. text={}
  4. lang={}
  5. lang.en={
  6.     menu="Menu",
  7.   profile2="Profile",
  8.   help2="Help",
  9.   help="To be edited..."
  10. }
  11. function setLang(n)
  12.     text[n]=lang[tfm.get.room.playerList[n].community] or lang.en
  13. end
  14. function setData(n)
  15.     data[n]={
  16.  
  17.   }
  18. end
  19. function showMenu(n)
  20.     ui.addTextArea(0, "<p align='center'><font face='calibri'><a href='event:menu2'>"..text[n].menu, n, 10, 30, 42, 20, 0x000001, 0xFFFFFF, 1, true)
  21. end
  22. function showMenu2(n)
  23.     ui.addTextArea(0, "<p align='center'><font face='calibri'><a href='event:Menu'>"..text[n].menu.." </a>| <a href='event:Help'>"..text[n].help2.."</a> | <a href='event:Profile'>"..text[n].profile2, n, 10, 30, 121, 20, 0x000001, 0xffffff, 1, true)
  24. end
  25. function displayTab(n,info,subject)
  26.     ui.addTextArea(2, "", n, 262, 72, 360, 290, 0x331f15, 0x331f15, 1, true)
  27.     ui.addTextArea(3, "", n, 262, 125, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  28.     ui.addTextArea(5, "", n, 295, 72, 290, 4, 0x6b4231, 0x6b4231, 1, true)
  29.     ui.addTextArea(4, "", n, 618, 125, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  30.     ui.addTextArea(6, "", n, 295, 358, 295, 4, 0x6b4231, 0x6b4231, 1, true)
  31.     ui.addTextArea(1, "<p align='center'><font face='calibri'><font size='17'><b>#BOMBDELIVER - "..subject.."</b></font></font><font size='14'>\n\n"..info, n, 272, 80, 342, 270, 0x1b262b, 0x131c21, 1, true)
  32.     ui.addTextArea(7, "<p align='center'><font size='13'><a href='event:close'>Close</a></font>", n, 273, 330, 339, 20, 0x324650, 0x324650, 1, true)
  33. end
  34. function close(n)
  35.     for i=1,7 do
  36.     ui.removeTextArea(i,n)
  37.   end
  38. end
  39. for n,player in pairs(tfm.get.room.playerList) do
  40.     setLang(n)
  41.   setData(n)
  42.   showMenu(n)
  43. end
  44. function eventTextAreaCallback(txt, n, a)
  45.     if a=="Menu" then
  46.     showMenu(n)
  47.   elseif a=="menu2" then
  48.     showMenu2(n)
  49.   elseif a=="Help" then
  50.     subject=text[n].help2
  51.     info=text[n].help
  52.     displayTab(n,info,subject)
  53.   elseif a=="close" then
  54.     close(n)
  55.   end
  56. end
Add Comment
Please, Sign In to add comment