seb-c

Untitled

May 1st, 2012
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.33 KB | None | 0 0
  1. local engl = xmlLoadFile ( "files/xml/english.xml" )
  2. local engValue = xmlNodeGetValue ( engl)
  3. local polsk = xmlLoadFile ( "files/xml/polski.xml" )
  4. local poslValue = xmlNodeGetValue ( polsk )
  5. local Deutsch2 = xmlLoadFile ( "files/xml/deutsch.xml" )
  6. local DeutschValue = xmlNodeGetValue ( Deutsch2 )
  7. local nederland = xmlLoadFile ( "files/xml/nederlands.xml" )
  8. local nederValue = xmlNodeGetValue ( nederland )
  9. local soum = xmlLoadFile ( "files/xml/soumi.xml" )
  10. local soumValue = xmlNodeGetValue ( soum )
  11. local swe = xmlLoadFile ( "files/xml/svenska.xml" )
  12. local sweValue = xmlNodeGetValue ( swe )
  13. local slovensk = xmlLoadFile ( "files/xml/slovenski.xml" )
  14. local slovValue = xmlNodeGetValue ( slovensk )
  15. local esti = xmlLoadFile ( "files/xml/eesti.xml" )
  16. local estiValue = xmlNodeGetValue ( esti )
  17. local latvi = xmlLoadFile ( "files/xml/latvijas.xml" )
  18. local latviNode = xmlNodeGetValue ( latvi )
  19. local dk = xmlLoadFile ( "files/xml/danske.xml" )
  20. local dkNode = xmlNodeGetValue ( dk )
  21. local nor = xmlLoadFile ( "files/xml/norsk.xml" )
  22. local norNode = xmlNodeGetValue ( nor )
  23. local it = xmlLoadFile ( "files/xml/italiano.xml" )
  24. local itNode = xmlNodeGetValue ( it )
  25. local filip = xmlLoadFile ( "files/xml/filipino.xml" )
  26. local filipNode = xmlNodeGetValue( filip )
  27. local bahasa = xmlLoadFile ( "files/xml/bahasa.xml" )
  28. local bahNode = xmlNodeGetValue ( bahasa )
  29. local touni = xmlLoadFile ( "files/xml/tounisi.xml" )
  30. local touniNode = xmlNodeGetValue ( touni )
  31. local espan0l = xmlLoadFile ( "files/xml/espanol.xml" )
  32. local espanolNode = xmlNodeGetValue ( espan0l )
  33. local arab = xmlLoadFile ( "files/xml/arabic.xml" )
  34. local arabicNode = xmlNodeGetValue ( arab )
  35. local staff = xmlLoadFile ( "files/xml/staff.xml" )
  36. local staffText = xmlNodeGetValue ( staff )
  37. local info = xmlLoadFile ( "files/xml/info.xml" )
  38. local infoText = xmlNodeGetValue ( info )
  39. local faq = xmlLoadFile ( "files/xml/faq.xml" )
  40. local faqText = xmlNodeGetValue ( faq )
  41.  
  42.  
  43. showCursor ( true )
  44. mainWindow = guiCreateWindow(0.245,0.1922,0.5175,0.7,"",true)
  45. English = guiCreateButton(0.0229,0.0333,0.1135,0.0556,"English",true,mainWindow)
  46. Polski = guiCreateButton(0.0229,0.1175,0.1135,0.0556,"Polski",true,mainWindow)
  47. Deutsch = guiCreateButton(0.0229,0.2079,0.1135,0.0556,"Deutsch",true,mainWindow)
  48. Nederlands = guiCreateButton(0.0242,0.2921,0.1135,0.0556,"Nederlands",true,mainWindow)
  49. Soumi = guiCreateButton(0.0242,0.3825,0.1135,0.0556,"Soumi",true,mainWindow)
  50. Svenska = guiCreateButton(0.0229,0.4667,0.1135,0.0556,"Svenska",true,mainWindow)
  51. Slovenski = guiCreateButton(0.0229,0.5508,0.1135,0.0556,"Slovenski",true,mainWindow)
  52. Eesti = guiCreateButton(0.0229,0.6286,0.1135,0.0556,"Eesti",true,mainWindow)
  53. Latvijas = guiCreateButton(0.0229,0.7127,0.1135,0.0556,"Latvijas",true,mainWindow)
  54. Dansk = guiCreateButton(0.0229,0.8063,0.1135,0.0556,"Dansk",true,mainWindow)
  55. Norsk = guiCreateButton(0.0242,0.8905,0.1135,0.0556,"Norsk",true,mainWindow)
  56. Italiano = guiCreateButton(0.8671,0.0349,0.1135,0.0556,"Italiano",true,mainWindow)
  57. Filipino = guiCreateButton(0.8671,0.1175,0.1135,0.0556,"Filipino",true,mainWindow)
  58. BahasaIndonesia = guiCreateButton(0.8659,0.1968,0.1135,0.0556,"Bahasa Indonesia",true,mainWindow)
  59. Tounisi = guiCreateButton(0.8659,0.2857,0.1135,0.0556,"Tounisi",true,mainWindow)
  60. Espanol = guiCreateButton(0.8647,0.3698,0.1135,0.0556,"Espanol",true,mainWindow)
  61. Arabic = guiCreateButton(0.8647,0.4524,0.1135,0.0556,"Arabic",true,mainWindow)
  62. StaffB = guiCreateButton(0.2923,0.0333,0.1135,0.0556,"Staff Roster",true,mainWindow)
  63. FaqB = guiCreateButton(0.4493,0.0333,0.1135,0.0556,"FAQ",true,mainWindow)
  64. InfoB = guiCreateButton(0.6002,0.0333,0.1135,0.0556,"Overview",true,mainWindow)
  65. CloseB = guiCreateButton(0.9167,0.9302,0.0592,0.0492,"X",true,mainWindow)
  66. theMemo = guiCreateMemo(0.1449,0.0937,0.7174,0.8556,"Hello and welcome to the Information Panel.\n\nTo see the rules in your language click on the button named your language.\nCan't find your language? If you would like it to be added, contact an admin or contact us at our website (WEBSITE HERE)\n\nIn the meanwhile, you can read the rules in English, this is an English speaking server afterall.\n\nYou can also find information as Staff Roster, FAQ and Overview but those are only avaliable in English.",true,mainWindow)
  67.  
  68.  
  69. function buttonClick(button)
  70.     if (button) ~= "left" then return end
  71.     if ( source == CloseB ) then
  72.     guiSetVisible ( mainWindow, false )
  73.     showCursor ( false )
  74.     elseif (source == English) then
  75.         guiSetText( theMemo, tostring ( engValue ) )
  76.     elseif ( source == Polski ) then
  77.         guiSetText( theMemo, tostring ( poslValue ) )
  78.     elseif ( source == Nederlands ) then
  79.         guiSetText( theMemo, tostring ( nederValue ) )
  80.     elseif ( source == Deutsch ) then
  81.         guiSetText( theMemo, tostring ( DeutschValue ) )
  82.     elseif ( source == Soumi ) then
  83.         guiSetText( theMemo, tostring ( soumValue ) )
  84.     elseif ( source == Svenska ) then
  85.         guiSetText( theMemo, tostring ( sweValue ) )   
  86.     elseif ( source == Slovenski ) then
  87.         guiSetText( theMemo, tostring ( slovValue ) )
  88.     elseif ( source == Eesti ) then
  89.         guiSetText( theMemo, tostring ( estiValue ) )
  90.     elseif ( source == Latvijas ) then
  91.         guiSetText( theMemo, tostring ( latviNode ) )
  92.     elseif ( source == Dansk ) then
  93.         guiSetText( theMemo, tostring ( dkNode ) )
  94.     elseif ( source == Norsk ) then
  95.         guiSetText( theMemo, tostring ( norNode ) )
  96.     elseif ( source == Italiano ) then
  97.         guiSetText( theMemo, tostring ( itNode ) )
  98.     elseif ( source == Filipino ) then
  99.         guiSetText( theMemo, tostring ( filipNode ) )
  100.     elseif ( source == BahasaIndonesia ) then
  101.         guiSetText( theMemo, tostring ( bahNode ) )
  102.     elseif ( source == Tounisi ) then
  103.         guiSetText( theMemo, tostring ( touniNode ) )
  104.     elseif ( source == Espanol ) then
  105.         guiSetText( theMemo, tostring ( espanolNode ) )
  106.     elseif ( source == Arabic ) then
  107.         guiSetText( theMemo, tostring ( arabicNode ) ) 
  108.     elseif ( source == StaffB ) then
  109.         guiSetText( theMemo, tostring ( staffText ) )  
  110.     elseif ( source == FaqB ) then
  111.         guiSetText( theMemo, tostring ( faqText ) )
  112.     elseif ( source == InfoB ) then
  113.         guiSetText( theMemo, tostring ( infoText ) )   
  114.     end
  115. end
  116. addEventHandler("onClientGUIClick", resourceRoot, buttonClick, true)
  117.  
  118. function showGUI()
  119.     if (guiGetVisible ( mainWindow )) then
  120.         showCursor(false)
  121.         guiSetVisible ( mainWindow, false )
  122.     else
  123.         showCursor(  true )
  124.         guiSetVisible( mainWindow, true )
  125.     end
  126. end
  127. bindKey ( "F1", "down", showGUI)
Advertisement
Add Comment
Please, Sign In to add comment