17 Ekim 2018, 09:44:50

Gönderen Konu: [YARDIM] Greenzone Teleport Kapatma  (Okunma sayısı 297 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

FreyZan

  • Yeni Üye
  • *
  • Default Avatar
  • İleti: 4
[YARDIM] Greenzone Teleport Kapatma
« : 05 Haziran 2017, 18:16:29 »
Ben sw me jail skripti koydum fakat f1 kapalı yeşil alanda ama teleport paneli ile çıkabiliyorlar nasıl kapatabilirim?
« Son Düzenleme: 06 Haziran 2017, 00:18:52 Gönderen: Narkoz »
 

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

[YARDIM] Greenzone Teleport Kapatma
« : 05 Haziran 2017, 18:16:29 »

Paradox

  • Kurucu
  • *
  • İleti: 677
  • SH Gaming
Ynt: [Yardım] greenzone teleport kapatma
« Yanıtla #1 : 05 Haziran 2017, 18:56:11 »
Greenzone ile teleport panelinizin kodlarını atarmısınız.
 

FreyZan

  • Yeni Üye
  • *
  • Default Avatar
  • İleti: 4
Ynt: [Yardım] greenzone teleport kapatma
« Yanıtla #2 : 05 Haziran 2017, 18:57:35 »
Kod: Lua
  1. addEventHandler ("onResourceStart", getRootElement(),
  2. function()
  3.   setTimer (moneyZoneTimerFunction, 2500, 0)
  4.   local allGreenzones = getElementsByType ("radararea")
  5.   for i,v in ipairs (allGreenzones) do
  6.     local r,g,b,a = getRadarAreaColor (v)
  7.     if (r == 0) and (g == 255) and (b == 0) and (a == 127) then
  8.       local x,y = getElementPosition (v)
  9.       local sx,sy = getRadarAreaSize (v)
  10.       local col = createColCuboid (x,y, -50, sx,sy, 7500)
  11.       setElementID (col, "greenzoneColshape")
  12.     end
  13.   end
  14. end)
  15.  
  16. addEventHandler ("onColShapeHit", getRootElement(),
  17. function(hitElement, matchingDimension)
  18.   if (getElementType (hitElement) == "player") and (getElementID (source) == "greenzoneColshape") then
  19.     toggleControl (hitElement, "fire", false)
  20.     toggleControl (hitElement, "next_weapon", false)
  21.     toggleControl (hitElement, "previous_weapon", false)
  22.     toggleControl (hitElement, "sprint", false)
  23.     toggleControl (hitElement, "aim_weapon", false)
  24.     toggleControl (hitElement, "vehicle_fire", false)
  25.     showPlayerHudComponent (hitElement, "ammo", false)
  26.     showPlayerHudComponent (hitElement, "weapon", false)
  27.     setElementData(hitElement, "Greenzone",true)
  28.     triggerClientEvent (hitElement, "enableGodMode", hitElement)
  29.   end
  30.   if (source == moneyZoneCol) and (getElementType (hitElement) == "vehicle") then
  31.     setElementVelocity (hitElement, 0, 0, 0)
  32.     setElementPosition (hitElement, 2018.33, 1534.77, 12.37)
  33.     setVehicleRotation (hitElement, 0,0,270)
  34.     if (getVehicleOccupant (hitElement, 0)) then
  35.       outputChatBox ("You can't enter the moneyzone with your car!", getVehicleOccupant (hitElement, 0), 255, 0, 0, false)
  36.     end
  37.   end
  38. end)
  39.  
  40. addEventHandler ("onColShapeLeave", getRootElement(),
  41. function(leaveElement, matchingDimension)
  42.   if (getElementType (leaveElement) == "player") and (getElementID (source) == "greenzoneColshape") then
  43.     toggleControl (leaveElement, "fire", true)
  44.     toggleControl (leaveElement, "next_weapon", true)
  45.     toggleControl (leaveElement, "previous_weapon", true)
  46.     toggleControl (leaveElement, "sprint", true)
  47.     toggleControl (leaveElement, "aim_weapon", true)
  48.     toggleControl (leaveElement, "vehicle_fire", true)
  49.     showPlayerHudComponent (leaveElement, "ammo", true)
  50.     showPlayerHudComponent (leaveElement, "weapon", true)
  51.     setElementData(leaveElement, "Greenzone",false)
  52.     triggerClientEvent (leaveElement, "disableGodMode", leaveElement)
  53.   end
  54. end)
  55.  
  56. --money zone col
  57. moneyZoneCol = createColCuboid (1993.12, 1519.14, -100, 17.43, 54.24, 117)
  58. --stop moneyzone col
  59.  
  60. function moneyZoneTimerFunction ()
  61.   local allPlayersInCol = getElementsWithinColShape (moneyZoneCol, "player")
  62.   for i,v in ipairs (allPlayersInCol) do
  63.     givePlayerMoney (v, 5)
  64.   end
  65. end
  66.  
  67. -- marker bij hospital
  68. createMarker (1607.36, 1814.24, -10, "cylinder", 24, 0, 255, 0, 190, getRootElement())
Bu greenzone

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, ".", 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, "Hapsane/Jail", 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 , 1544.1174316406, -1676.0473632813, 13.557782173157  )
  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 , 1544.1174316406, -1676.0473632813, 13.557782173157  )
  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 , 1544.1174316406, -1676.0473632813, 13.557782173157  )
  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. )

Buda teleport
 

Paradox

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

FreyZan

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