22 Temmuz 2018, 11:58:47

Gönderen Konu: [YARDIM] Panel Hakkında Sorun Var  (Okunma sayısı 381 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

LaykSis

  • Yeni Üye
  • *
  • Default Avatar
  • İleti: 44
[YARDIM] Panel Hakkında Sorun Var
« : 29 Mayıs 2017, 00:49:40 »
Arkadaşlar Oyuna girer girmez panel açılıyor
Kod: Lua
  1. function Window ( )
  2.  
  3.         if ( guiGetVisible ( myWindow ) == true ) then  
  4.        
  5.                 guiSetVisible ( myWindow, false )
  6.  
  7.                 showCursor ( false )
  8.         else      
  9.                 guiSetVisible ( myWindow, true )
  10.  
  11.                 showCursor ( true )
  12.         end
  13. end
  14.  
  15.  
  16. myWindow = guiCreateWindow ( 0.35, 0.0, .4, .5, "LC-Gaming.", true )
  17.  
  18.  
  19.  
  20. local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow )
  21.  
  22.  
  23.  
  24. local Teleports = guiCreateTab( "Işınlanma Paneli", tabPanel )
  25.  
  26.  
  27.  
  28. --GUI Buttons
  29. LSAirport = guiCreateButton( 0.03, 0.01, 0.18, 0.12, "Doğma Bölgesi", true, Teleports )
  30. guiSetFont ( LSAirport, "default-bold-small" )
  31.  
  32. LVAirport = guiCreateButton( 0.03, 0.13, 0.18, 0.12, "Doğma Bölgesi-2", true, Teleports )
  33. guiSetFont ( LVAirport, "default-bold-small" )
  34.  
  35. AbandedAirstrip = guiCreateButton( 0.03, 0.25, 0.18, 0.12, "Desert Airstrip", true, Teleports )
  36. guiSetFont ( AbandedAirstrip, "default-bold-small" )
  37.  
  38. SFAirport = guiCreateButton( 0.03, 0.37, 0.18, 0.12, "SF  Airport", true, Teleports )
  39. guiSetFont ( SFAirport, "default-bold-small" )
  40.  
  41. MountChiliad = guiCreateButton( 0.03, 0.49, 0.18, 0.12, "Mount Chiliad", true, Teleports )
  42. guiSetFont ( MountChiliad, "default-bold-small" )
  43.  
  44. WangCars = guiCreateButton( 0.03, 0.61, 0.18, 0.12, "Wang Cars", true, Teleports )
  45. guiSetFont ( WangCars, "default-bold-small" )
  46.  
  47. Ottos = guiCreateButton( 0.4, 0.01, 0.18, 0.12, "Otto's Cars", true, Teleports )
  48. guiSetFont ( Ottos, "default-bold-small" )
  49.  
  50. Area51 = guiCreateButton( 0.4, 0.13, 0.18, 0.12, "Area 51", true, Teleports )
  51. guiSetFont ( Area51, "default-bold-small" )
  52.  
  53. BigEar = guiCreateButton( 0.4, 0.25, 0.18, 0.12, "Big Ear", true, Teleports )
  54. guiSetFont ( BigEar, "default-bold-small" )
  55.  
  56. BlueBerry = guiCreateButton( 0.4, 0.37, 0.18, 0.12, "BlueBerry Acres", true, Teleports )
  57. guiSetFont ( BlueBerry, "default-bold-small" )
  58.  
  59. Heli = guiCreateButton( 0.4, 0.49, 0.18, 0.12, "Heli Pad", true, Teleports )
  60. guiSetFont ( Heli, "default-bold-small" )
  61.  
  62. Grove = guiCreateButton( 0.4, 0.61, 0.18, 0.12, "Grove Street", true, Teleports )
  63. guiSetFont ( Grove, "default-bold-small" )
  64.  
  65. Dam = guiCreateButton( 0.77, 0.01, 0.18, 0.12, "Sherman Dam", true, Teleports )
  66. guiSetFont ( Dam, "default-bold-small" )
  67.  
  68. BackBeyond = guiCreateButton( 0.77, 0.13, 0.18, 0.12, "Back O Beyond", true, Teleports )
  69. guiSetFont ( BackBeyond, "default-bold-small" )
  70.  
  71. Quarry = guiCreateButton( 0.77, 0.25, 0.18, 0.12, "Quarry", true, Teleports )
  72. guiSetFont ( Quarry, "default-bold-small" )
  73.  
  74. Bayside = guiCreateButton( 0.77, 0.37, 0.18, 0.12, "Bayside", true, Teleports )
  75. guiSetFont ( Bayside, "default-bold-small" )
  76.  
  77. Pecker = guiCreateButton( 0.77, 0.49, 0.18, 0.12, "Las Payasadas", true, Teleports )
  78. guiSetFont ( Pecker, "default-bold-small" )
  79.  
  80. Bridge = guiCreateButton( 0.77, 0.61, 0.18, 0.12, "Bridge Facts", true, Teleports )
  81. guiSetFont ( Bridge, "default-bold-small" )
  82.  
  83. Close = guiCreateButton( -0.03, 0.94, 1.1, 0.063, "Çıkış 'F6'", true, Teleports )
  84. guiSetFont ( Close, "default-bold-small" )
  85.  
  86.  
  87. bindKey ( "F6", "down", Window )
  88.  
  89.  
  90. guiSetAlpha ( myWindow, 1 )
  91. guiWindowSetSizable ( myWindow, false )
  92.  
  93.  
  94.  
  95. --Create Labels
  96.  
  97. guiLabelSetColor ( One, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
  98.  
  99. guiSetFont ( One, "sa-header" )
  100.  
  101. --Label Color
  102. function changeLabelColor ( )
  103.  
  104.         guiLabelSetColor ( One, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
  105. end
  106.  
  107. setTimer ( changeLabelColor, 1000, 0 )
  108.  
  109.  
  110. --Close
  111. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  112.         function ( )
  113.            if (source == Close) then
  114.            guiSetVisible( myWindow, false )
  115.            showCursor( false )
  116.                 end  
  117.  
  118.            end
  119. )
  120.  
  121.  
  122. --Teleports
  123. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  124.         function ( )
  125.             if (source == MountChiliad) then
  126.             local player = getLocalPlayer()
  127.                     setElementPosition (player , -1968.8029785156, 137.68307495117, 27.6875  )
  128.             end
  129.           end
  130. )
  131.  
  132. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  133.         function ( )
  134.             if (source == LSAirport) then
  135.             local player = getLocalPlayer()
  136.                         setElementPosition (player , -1967.6000976563, 138.28996276855, 27.6875  )
  137.             end
  138.          end
  139. )
  140.  
  141. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  142.         function ( )
  143.             if (source == LVAirport) then
  144.             local player = getLocalPlayer()
  145.                   setElementPosition (player , 2629.4404296875, 1824.8934326172, 11.0234375  )
  146.             end
  147.          end
  148. )
  149.  
  150. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  151.         function ( )
  152.             if (source == AbandedAirstrip) then
  153.             local player = getLocalPlayer()
  154.                   setElementPosition (player , 405.55480957031, 2537.8181152344, 15.9504671096  )
  155.             end
  156.          end
  157. )
  158.  
  159. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  160.         function ( )
  161.             if (source == SFAirport) then
  162.             local player = getLocalPlayer()
  163.                   setElementPosition (player , -1223.4442138672, 43.506820678711, 13.541401863098  )
  164.             end
  165.          end
  166. )
  167.  
  168. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  169.         function ( )
  170.             if (source == WangCars) then
  171.             local player = getLocalPlayer()
  172.                   setElementPosition (player , -1973.0573730469, 303.94955444336, 34.576179504395  )
  173.             end
  174.          end
  175. )
  176.  
  177. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  178.         function ( )
  179.             if (source == Ottos) then
  180.             local player = getLocalPlayer()
  181.                   setElementPosition (player , -1643.1949462891, 1212.7462158203, 6.5843458175659  )
  182.             end
  183.          end
  184. )
  185.  
  186. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  187.         function ( )
  188.             if (source == Area51) then
  189.             local player = getLocalPlayer()
  190.                   setElementPosition (player , 215.36633300781, 1919.0992431641, 17.04539108276  )
  191.             end
  192.          end
  193. )
  194.  
  195. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  196.         function ( )
  197.             if (source == BigEar) then
  198.             local player = getLocalPlayer()
  199.                   setElementPosition (player , -294.39447021484, 1538.9415283203, 74.965629577637  )
  200.             end
  201.          end
  202. )
  203.  
  204. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  205.         function ( )
  206.             if (source == BlueBerry) then
  207.             local player = getLocalPlayer()
  208.                   setElementPosition (player , -3.3661103248596, 36.78341293335, 2.5212655067444  )
  209.             end
  210.          end
  211. )
  212.  
  213. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  214.         function ( )
  215.             if (source == Heli) then
  216.             local player = getLocalPlayer()
  217.                   setElementPosition (player , 1535.7916259766, -1353.4775390625, 328.86157226563  )
  218.             end
  219.          end
  220. )
  221.  
  222. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  223.         function ( )
  224.             if (source == Grove) then
  225.             local player = getLocalPlayer()
  226.                   setElementPosition (player , 2495.3193359375, -1690.1716308594, 14.765625 )
  227.             end
  228.          end
  229. )
  230.  
  231. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  232.         function ( )
  233.             if (source == Dam) then
  234.             local player = getLocalPlayer()
  235.                   setElementPosition (player , -887.02734375, 2000.9217529297, 60.654315948486 )
  236.             end
  237.          end
  238. )
  239.  
  240. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  241.         function ( )
  242.             if (source == BackBeyond) then
  243.             local player = getLocalPlayer()
  244.                   setElementPosition (player , -938.93298339844, -2346.8010253906, 59.003288269043 )
  245.             end
  246.          end
  247. )
  248.  
  249. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  250.         function ( )
  251.             if (source == Quarry) then
  252.             local player = getLocalPlayer()
  253.                   setElementPosition (player , 816.45257568359, 853.38360595703, 11.109794616699 )
  254.             end
  255.          end
  256. )
  257.  
  258. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  259.         function ( )
  260.             if (source == Bayside) then
  261.             local player = getLocalPlayer()
  262.                   setElementPosition (player , -2244.837890625, 2307.1701660156, 4.9691247940063 )
  263.             end
  264.          end
  265. )
  266.  
  267. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  268.         function ( )
  269.             if (source == Pecker) then
  270.             local player = getLocalPlayer()
  271.                   setElementPosition (player , -418.42318725586, 2710.0107421875, 62.473159790039 )
  272.             end
  273.          end
  274. )
  275.  
  276. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  277.         function ( )
  278.             if (source == Bridge) then
  279.             local player = getLocalPlayer()
  280.                   setElementPosition (player , -2555.5734863281, 1217.0106201172, 42.1484375 )
  281.  
  282.             end
  283.          end
  284. )
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
« Son Düzenleme: 29 Mayıs 2017, 01:15:16 Gönderen: Narkoz »
 

MTASA-TURK | Türkiye'nin En Güncel MTA Platformu

[YARDIM] Panel Hakkında Sorun Var
« : 29 Mayıs 2017, 00:49:40 »

Paradox

  • Kurucu
  • *
  • İleti: 649
  • SH Gaming
Ynt: [Yardım] Panel
« Yanıtla #1 : 29 Mayıs 2017, 00:52:48 »
Kod: Lua
  1. function Window ( )
  2.         if ( guiGetVisible ( myWindow ) == true ) then  
  3.        
  4.                 guiSetVisible ( myWindow, false )
  5.  
  6.                 showCursor ( false )
  7.         else      
  8.                 guiSetVisible ( myWindow, true )
  9.  
  10.                 showCursor ( true )
  11.         end
  12. end
  13.  bindKey ( "F6", "down", Window )
  14.  
  15. myWindow = guiCreateWindow ( 0.35, 0.0, .4, .5, "LC-Gaming.", true )
  16.  guiSetVisible(myWindow,false)
  17.  
  18.  
  19. local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow )
  20. local Teleports = guiCreateTab( "Işınlanma Paneli", tabPanel )
  21.  
  22. --GUI Buttons
  23. LSAirport = guiCreateButton( 0.03, 0.01, 0.18, 0.12, "Doğma Bölgesi", true, Teleports )
  24. guiSetFont ( LSAirport, "default-bold-small" )
  25.  
  26. LVAirport = guiCreateButton( 0.03, 0.13, 0.18, 0.12, "Doğma Bölgesi-2", true, Teleports )
  27. guiSetFont ( LVAirport, "default-bold-small" )
  28.  
  29. AbandedAirstrip = guiCreateButton( 0.03, 0.25, 0.18, 0.12, "Desert Airstrip", true, Teleports )
  30. guiSetFont ( AbandedAirstrip, "default-bold-small" )
  31.  
  32. SFAirport = guiCreateButton( 0.03, 0.37, 0.18, 0.12, "SF  Airport", true, Teleports )
  33. guiSetFont ( SFAirport, "default-bold-small" )
  34.  
  35. MountChiliad = guiCreateButton( 0.03, 0.49, 0.18, 0.12, "Mount Chiliad", true, Teleports )
  36. guiSetFont ( MountChiliad, "default-bold-small" )
  37.  
  38. WangCars = guiCreateButton( 0.03, 0.61, 0.18, 0.12, "Wang Cars", true, Teleports )
  39. guiSetFont ( WangCars, "default-bold-small" )
  40.  
  41. Ottos = guiCreateButton( 0.4, 0.01, 0.18, 0.12, "Otto's Cars", true, Teleports )
  42. guiSetFont ( Ottos, "default-bold-small" )
  43.  
  44. Area51 = guiCreateButton( 0.4, 0.13, 0.18, 0.12, "Area 51", true, Teleports )
  45. guiSetFont ( Area51, "default-bold-small" )
  46.  
  47. BigEar = guiCreateButton( 0.4, 0.25, 0.18, 0.12, "Big Ear", true, Teleports )
  48. guiSetFont ( BigEar, "default-bold-small" )
  49.  
  50. BlueBerry = guiCreateButton( 0.4, 0.37, 0.18, 0.12, "BlueBerry Acres", true, Teleports )
  51. guiSetFont ( BlueBerry, "default-bold-small" )
  52.  
  53. Heli = guiCreateButton( 0.4, 0.49, 0.18, 0.12, "Heli Pad", true, Teleports )
  54. guiSetFont ( Heli, "default-bold-small" )
  55.  
  56. Grove = guiCreateButton( 0.4, 0.61, 0.18, 0.12, "Grove Street", true, Teleports )
  57. guiSetFont ( Grove, "default-bold-small" )
  58.  
  59. Dam = guiCreateButton( 0.77, 0.01, 0.18, 0.12, "Sherman Dam", true, Teleports )
  60. guiSetFont ( Dam, "default-bold-small" )
  61.  
  62. BackBeyond = guiCreateButton( 0.77, 0.13, 0.18, 0.12, "Back O Beyond", true, Teleports )
  63. guiSetFont ( BackBeyond, "default-bold-small" )
  64.  
  65. Quarry = guiCreateButton( 0.77, 0.25, 0.18, 0.12, "Quarry", true, Teleports )
  66. guiSetFont ( Quarry, "default-bold-small" )
  67.  
  68. Bayside = guiCreateButton( 0.77, 0.37, 0.18, 0.12, "Bayside", true, Teleports )
  69. guiSetFont ( Bayside, "default-bold-small" )
  70.  
  71. Pecker = guiCreateButton( 0.77, 0.49, 0.18, 0.12, "Las Payasadas", true, Teleports )
  72. guiSetFont ( Pecker, "default-bold-small" )
  73.  
  74. Bridge = guiCreateButton( 0.77, 0.61, 0.18, 0.12, "Bridge Facts", true, Teleports )
  75. guiSetFont ( Bridge, "default-bold-small" )
  76.  
  77. Close = guiCreateButton( -0.03, 0.94, 1.1, 0.063, "Çıkış 'F6'", true, Teleports )
  78. guiSetFont ( Close, "default-bold-small" )
  79.  
  80. guiSetAlpha ( myWindow, 1 )
  81. guiWindowSetSizable ( myWindow, false )
  82.  
  83.  
  84. --Create Labels
  85.  
  86. guiLabelSetColor ( One, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
  87.  
  88. guiSetFont ( One, "sa-header" )
  89.  
  90. --Label Color
  91. function changeLabelColor ( )
  92.  
  93.         guiLabelSetColor ( One, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
  94. end
  95.  
  96. setTimer ( changeLabelColor, 1000, 0 )
  97.  
  98.  
  99. --Close
  100. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  101.         function ( )
  102.            if (source == Close) then
  103.            guiSetVisible( myWindow, false )
  104.            showCursor( false )
  105.                 end  
  106.  
  107.            end
  108. )
  109.  
  110.  
  111. --Teleports
  112. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  113.         function ( )
  114.             if (source == MountChiliad) then
  115.             local player = getLocalPlayer()
  116.                     setElementPosition (player , -1968.8029785156, 137.68307495117, 27.6875  )
  117.             end
  118.           end
  119. )
  120.  
  121. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  122.         function ( )
  123.             if (source == LSAirport) then
  124.             local player = getLocalPlayer()
  125.                         setElementPosition (player , -1967.6000976563, 138.28996276855, 27.6875  )
  126.             end
  127.          end
  128. )
  129.  
  130. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  131.         function ( )
  132.             if (source == LVAirport) then
  133.             local player = getLocalPlayer()
  134.                   setElementPosition (player , 2629.4404296875, 1824.8934326172, 11.0234375  )
  135.             end
  136.          end
  137. )
  138.  
  139. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  140.         function ( )
  141.             if (source == AbandedAirstrip) then
  142.             local player = getLocalPlayer()
  143.                   setElementPosition (player , 405.55480957031, 2537.8181152344, 15.9504671096  )
  144.             end
  145.          end
  146. )
  147.  
  148. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  149.         function ( )
  150.             if (source == SFAirport) then
  151.             local player = getLocalPlayer()
  152.                   setElementPosition (player , -1223.4442138672, 43.506820678711, 13.541401863098  )
  153.             end
  154.          end
  155. )
  156.  
  157. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  158.         function ( )
  159.             if (source == WangCars) then
  160.             local player = getLocalPlayer()
  161.                   setElementPosition (player , -1973.0573730469, 303.94955444336, 34.576179504395  )
  162.             end
  163.          end
  164. )
  165.  
  166. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  167.         function ( )
  168.             if (source == Ottos) then
  169.             local player = getLocalPlayer()
  170.                   setElementPosition (player , -1643.1949462891, 1212.7462158203, 6.5843458175659  )
  171.             end
  172.          end
  173. )
  174.  
  175. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  176.         function ( )
  177.             if (source == Area51) then
  178.             local player = getLocalPlayer()
  179.                   setElementPosition (player , 215.36633300781, 1919.0992431641, 17.04539108276  )
  180.             end
  181.          end
  182. )
  183.  
  184. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  185.         function ( )
  186.             if (source == BigEar) then
  187.             local player = getLocalPlayer()
  188.                   setElementPosition (player , -294.39447021484, 1538.9415283203, 74.965629577637  )
  189.             end
  190.          end
  191. )
  192.  
  193. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  194.         function ( )
  195.             if (source == BlueBerry) then
  196.             local player = getLocalPlayer()
  197.                   setElementPosition (player , -3.3661103248596, 36.78341293335, 2.5212655067444  )
  198.             end
  199.          end
  200. )
  201.  
  202. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  203.         function ( )
  204.             if (source == Heli) then
  205.             local player = getLocalPlayer()
  206.                   setElementPosition (player , 1535.7916259766, -1353.4775390625, 328.86157226563  )
  207.             end
  208.          end
  209. )
  210.  
  211. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  212.         function ( )
  213.             if (source == Grove) then
  214.             local player = getLocalPlayer()
  215.                   setElementPosition (player , 2495.3193359375, -1690.1716308594, 14.765625 )
  216.             end
  217.          end
  218. )
  219.  
  220. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  221.         function ( )
  222.             if (source == Dam) then
  223.             local player = getLocalPlayer()
  224.                   setElementPosition (player , -887.02734375, 2000.9217529297, 60.654315948486 )
  225.             end
  226.          end
  227. )
  228.  
  229. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  230.         function ( )
  231.             if (source == BackBeyond) then
  232.             local player = getLocalPlayer()
  233.                   setElementPosition (player , -938.93298339844, -2346.8010253906, 59.003288269043 )
  234.             end
  235.          end
  236. )
  237.  
  238. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  239.         function ( )
  240.             if (source == Quarry) then
  241.             local player = getLocalPlayer()
  242.                   setElementPosition (player , 816.45257568359, 853.38360595703, 11.109794616699 )
  243.             end
  244.          end
  245. )
  246.  
  247. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  248.         function ( )
  249.             if (source == Bayside) then
  250.             local player = getLocalPlayer()
  251.                   setElementPosition (player , -2244.837890625, 2307.1701660156, 4.9691247940063 )
  252.             end
  253.          end
  254. )
  255.  
  256. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  257.         function ( )
  258.             if (source == Pecker) then
  259.             local player = getLocalPlayer()
  260.                   setElementPosition (player , -418.42318725586, 2710.0107421875, 62.473159790039 )
  261.             end
  262.          end
  263. )
  264.  
  265. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  266.         function ( )
  267.             if (source == Bridge) then
  268.             local player = getLocalPlayer()
  269.                   setElementPosition (player , -2555.5734863281, 1217.0106201172, 42.1484375 )
  270.  
  271.             end
  272.          end
  273. )
Buyur.
 

LaykSis

  • Yeni Üye
  • *
  • Default Avatar
  • İleti: 44
Ynt: [Yardım] Panel
« Yanıtla #2 : 29 Mayıs 2017, 00:54:16 »
Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın
Kod: Lua
  1. function Window ( )
  2.         if ( guiGetVisible ( myWindow ) == true ) then  
  3.        
  4.                 guiSetVisible ( myWindow, false )
  5.  
  6.                 showCursor ( false )
  7.         else      
  8.                 guiSetVisible ( myWindow, true )
  9.  
  10.                 showCursor ( true )
  11.         end
  12. end
  13.  bindKey ( "F6", "down", Window )
  14.  
  15. myWindow = guiCreateWindow ( 0.35, 0.0, .4, .5, "LC-Gaming.", true )
  16.  guiSetVisible(myWindow,false)
  17.  
  18.  
  19. local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow )
  20. local Teleports = guiCreateTab( "Işınlanma Paneli", tabPanel )
  21.  
  22. --GUI Buttons
  23. LSAirport = guiCreateButton( 0.03, 0.01, 0.18, 0.12, "Doğma Bölgesi", true, Teleports )
  24. guiSetFont ( LSAirport, "default-bold-small" )
  25.  
  26. LVAirport = guiCreateButton( 0.03, 0.13, 0.18, 0.12, "Doğma Bölgesi-2", true, Teleports )
  27. guiSetFont ( LVAirport, "default-bold-small" )
  28.  
  29. AbandedAirstrip = guiCreateButton( 0.03, 0.25, 0.18, 0.12, "Desert Airstrip", true, Teleports )
  30. guiSetFont ( AbandedAirstrip, "default-bold-small" )
  31.  
  32. SFAirport = guiCreateButton( 0.03, 0.37, 0.18, 0.12, "SF  Airport", true, Teleports )
  33. guiSetFont ( SFAirport, "default-bold-small" )
  34.  
  35. MountChiliad = guiCreateButton( 0.03, 0.49, 0.18, 0.12, "Mount Chiliad", true, Teleports )
  36. guiSetFont ( MountChiliad, "default-bold-small" )
  37.  
  38. WangCars = guiCreateButton( 0.03, 0.61, 0.18, 0.12, "Wang Cars", true, Teleports )
  39. guiSetFont ( WangCars, "default-bold-small" )
  40.  
  41. Ottos = guiCreateButton( 0.4, 0.01, 0.18, 0.12, "Otto's Cars", true, Teleports )
  42. guiSetFont ( Ottos, "default-bold-small" )
  43.  
  44. Area51 = guiCreateButton( 0.4, 0.13, 0.18, 0.12, "Area 51", true, Teleports )
  45. guiSetFont ( Area51, "default-bold-small" )
  46.  
  47. BigEar = guiCreateButton( 0.4, 0.25, 0.18, 0.12, "Big Ear", true, Teleports )
  48. guiSetFont ( BigEar, "default-bold-small" )
  49.  
  50. BlueBerry = guiCreateButton( 0.4, 0.37, 0.18, 0.12, "BlueBerry Acres", true, Teleports )
  51. guiSetFont ( BlueBerry, "default-bold-small" )
  52.  
  53. Heli = guiCreateButton( 0.4, 0.49, 0.18, 0.12, "Heli Pad", true, Teleports )
  54. guiSetFont ( Heli, "default-bold-small" )
  55.  
  56. Grove = guiCreateButton( 0.4, 0.61, 0.18, 0.12, "Grove Street", true, Teleports )
  57. guiSetFont ( Grove, "default-bold-small" )
  58.  
  59. Dam = guiCreateButton( 0.77, 0.01, 0.18, 0.12, "Sherman Dam", true, Teleports )
  60. guiSetFont ( Dam, "default-bold-small" )
  61.  
  62. BackBeyond = guiCreateButton( 0.77, 0.13, 0.18, 0.12, "Back O Beyond", true, Teleports )
  63. guiSetFont ( BackBeyond, "default-bold-small" )
  64.  
  65. Quarry = guiCreateButton( 0.77, 0.25, 0.18, 0.12, "Quarry", true, Teleports )
  66. guiSetFont ( Quarry, "default-bold-small" )
  67.  
  68. Bayside = guiCreateButton( 0.77, 0.37, 0.18, 0.12, "Bayside", true, Teleports )
  69. guiSetFont ( Bayside, "default-bold-small" )
  70.  
  71. Pecker = guiCreateButton( 0.77, 0.49, 0.18, 0.12, "Las Payasadas", true, Teleports )
  72. guiSetFont ( Pecker, "default-bold-small" )
  73.  
  74. Bridge = guiCreateButton( 0.77, 0.61, 0.18, 0.12, "Bridge Facts", true, Teleports )
  75. guiSetFont ( Bridge, "default-bold-small" )
  76.  
  77. Close = guiCreateButton( -0.03, 0.94, 1.1, 0.063, "Çıkış 'F6'", true, Teleports )
  78. guiSetFont ( Close, "default-bold-small" )
  79.  
  80. guiSetAlpha ( myWindow, 1 )
  81. guiWindowSetSizable ( myWindow, false )
  82.  
  83.  
  84. --Create Labels
  85.  
  86. guiLabelSetColor ( One, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
  87.  
  88. guiSetFont ( One, "sa-header" )
  89.  
  90. --Label Color
  91. function changeLabelColor ( )
  92.  
  93.         guiLabelSetColor ( One, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
  94. end
  95.  
  96. setTimer ( changeLabelColor, 1000, 0 )
  97.  
  98.  
  99. --Close
  100. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  101.         function ( )
  102.            if (source == Close) then
  103.            guiSetVisible( myWindow, false )
  104.            showCursor( false )
  105.                 end  
  106.  
  107.            end
  108. )
  109.  
  110.  
  111. --Teleports
  112. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  113.         function ( )
  114.             if (source == MountChiliad) then
  115.             local player = getLocalPlayer()
  116.                     setElementPosition (player , -1968.8029785156, 137.68307495117, 27.6875  )
  117.             end
  118.           end
  119. )
  120.  
  121. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  122.         function ( )
  123.             if (source == LSAirport) then
  124.             local player = getLocalPlayer()
  125.                         setElementPosition (player , -1967.6000976563, 138.28996276855, 27.6875  )
  126.             end
  127.          end
  128. )
  129.  
  130. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  131.         function ( )
  132.             if (source == LVAirport) then
  133.             local player = getLocalPlayer()
  134.                   setElementPosition (player , 2629.4404296875, 1824.8934326172, 11.0234375  )
  135.             end
  136.          end
  137. )
  138.  
  139. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  140.         function ( )
  141.             if (source == AbandedAirstrip) then
  142.             local player = getLocalPlayer()
  143.                   setElementPosition (player , 405.55480957031, 2537.8181152344, 15.9504671096  )
  144.             end
  145.          end
  146. )
  147.  
  148. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  149.         function ( )
  150.             if (source == SFAirport) then
  151.             local player = getLocalPlayer()
  152.                   setElementPosition (player , -1223.4442138672, 43.506820678711, 13.541401863098  )
  153.             end
  154.          end
  155. )
  156.  
  157. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  158.         function ( )
  159.             if (source == WangCars) then
  160.             local player = getLocalPlayer()
  161.                   setElementPosition (player , -1973.0573730469, 303.94955444336, 34.576179504395  )
  162.             end
  163.          end
  164. )
  165.  
  166. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  167.         function ( )
  168.             if (source == Ottos) then
  169.             local player = getLocalPlayer()
  170.                   setElementPosition (player , -1643.1949462891, 1212.7462158203, 6.5843458175659  )
  171.             end
  172.          end
  173. )
  174.  
  175. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  176.         function ( )
  177.             if (source == Area51) then
  178.             local player = getLocalPlayer()
  179.                   setElementPosition (player , 215.36633300781, 1919.0992431641, 17.04539108276  )
  180.             end
  181.          end
  182. )
  183.  
  184. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  185.         function ( )
  186.             if (source == BigEar) then
  187.             local player = getLocalPlayer()
  188.                   setElementPosition (player , -294.39447021484, 1538.9415283203, 74.965629577637  )
  189.             end
  190.          end
  191. )
  192.  
  193. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  194.         function ( )
  195.             if (source == BlueBerry) then
  196.             local player = getLocalPlayer()
  197.                   setElementPosition (player , -3.3661103248596, 36.78341293335, 2.5212655067444  )
  198.             end
  199.          end
  200. )
  201.  
  202. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  203.         function ( )
  204.             if (source == Heli) then
  205.             local player = getLocalPlayer()
  206.                   setElementPosition (player , 1535.7916259766, -1353.4775390625, 328.86157226563  )
  207.             end
  208.          end
  209. )
  210.  
  211. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  212.         function ( )
  213.             if (source == Grove) then
  214.             local player = getLocalPlayer()
  215.                   setElementPosition (player , 2495.3193359375, -1690.1716308594, 14.765625 )
  216.             end
  217.          end
  218. )
  219.  
  220. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  221.         function ( )
  222.             if (source == Dam) then
  223.             local player = getLocalPlayer()
  224.                   setElementPosition (player , -887.02734375, 2000.9217529297, 60.654315948486 )
  225.             end
  226.          end
  227. )
  228.  
  229. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  230.         function ( )
  231.             if (source == BackBeyond) then
  232.             local player = getLocalPlayer()
  233.                   setElementPosition (player , -938.93298339844, -2346.8010253906, 59.003288269043 )
  234.             end
  235.          end
  236. )
  237.  
  238. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  239.         function ( )
  240.             if (source == Quarry) then
  241.             local player = getLocalPlayer()
  242.                   setElementPosition (player , 816.45257568359, 853.38360595703, 11.109794616699 )
  243.             end
  244.          end
  245. )
  246.  
  247. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  248.         function ( )
  249.             if (source == Bayside) then
  250.             local player = getLocalPlayer()
  251.                   setElementPosition (player , -2244.837890625, 2307.1701660156, 4.9691247940063 )
  252.             end
  253.          end
  254. )
  255.  
  256. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  257.         function ( )
  258.             if (source == Pecker) then
  259.             local player = getLocalPlayer()
  260.                   setElementPosition (player , -418.42318725586, 2710.0107421875, 62.473159790039 )
  261.             end
  262.          end
  263. )
  264.  
  265. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  266.         function ( )
  267.             if (source == Bridge) then
  268.             local player = getLocalPlayer()
  269.                   setElementPosition (player , -2555.5734863281, 1217.0106201172, 42.1484375 )
  270.  
  271.             end
  272.          end
  273. )
Buyur.
Adamsın