20 Haziran 2018, 16:11:43

Gönderen Konu: [YARDIM] Butona Basınca Başka Panel Açılması  (Okunma sayısı 545 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

By.Angel

  • Deneyimli Üye
  • *
  • Default Avatar
  • İleti: 388
[YARDIM] Butona Basınca Başka Panel Açılması
« : 07 Mart 2017, 17:59:29 »
Butona basınca başka panel açılmasını istiyorum. Kodunu atarsanız sevinirim.
« Son Düzenleme: 07 Mart 2017, 21:48:29 Gönderen: Narkoz »
 

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

[YARDIM] Butona Basınca Başka Panel Açılması
« : 07 Mart 2017, 17:59:29 »

Cynax

  • #
  • Uzman Üye
  • *
  • İleti: 546
  • Bıraktı
Ynt: [Yardım] Butana Basınca Başka Panel Açılması ?
« Yanıtla #1 : 07 Mart 2017, 18:03:42 »
Hiç script kurcalamayarak burda neden konu açıyorsun 2 - 3 tane script kurcala sonra gel bulamazsan yapamazsan konu aç her şeyi de biz söylemeyelim örnek kod:

Kod: Lua
  1. addEventHandler ("onClientGUIClick",root,
  2.     function()
  3.        if (source == buton1) then      
  4.         guiSetVisible(panel1, true)
  5.         guiSetVisible( panel2, false )
  6.        elseif (source == buton2) then      
  7.         guiSetVisible(panel1, false)
  8.         guiSetVisible(panel2, true)
  9.     end
  10. end
  11. )
 

By.Angel

  • Deneyimli Üye
  • *
  • Default Avatar
  • İleti: 388
Ynt: [Yardım] Butana Basınca Başka Panel Açılması ?
« Yanıtla #2 : 07 Mart 2017, 18:31:06 »
Kod: Lua
  1. GUIEditor = {
  2.     button = {},
  3.     window = {},
  4.     label = {}
  5. }
  6. addEventHandler("onClientResourceStart", resourceRoot,
  7.       function()
  8.         gui = guiCreateWindow(420, 265, 286, 390, "Araç | Kilit | Motor | Far | *_Panel_*", false)
  9.         guiWindowSetSizable(GUIEditor.window[1], false)
  10.         guiSetAlpha(GUIEditor.window[1], 1.00)
  11.         guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFE0000")
  12.         GUIEditor.button[1] = guiCreateButton(10, 56, 92, 22, "Far Aç", false, gui)
  13.         guiSetFont(GUIEditor.button[1], "default-bold-small")
  14.         guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF")
  15.         GUIEditor.button[2] = guiCreateButton(163, 56, 92, 22, "Far Kapat", false, gui)
  16.         guiSetFont(GUIEditor.button[2], "default-bold-small")
  17.         guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFFFFFF")
  18.         GUIEditor.label[1] = guiCreateLabel(0, 78, 271, 15, "_______________________________________", false, gui)
  19.         guiLabelSetColor(GUIEditor.label[1], 255, 152, 5)
  20.         GUIEditor.label[2] = guiCreateLabel(-4, 21, 271, 15, "_______________________________________", false, gui)
  21.         guiLabelSetColor(GUIEditor.label[2], 255, 152, 5)
  22.         GUIEditor.button[3] = guiCreateButton(10, 113, 92, 22, "Motor Aç", false, gui)
  23.         guiSetFont(GUIEditor.button[3], "default-bold-small")
  24.         guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFFFFFF")
  25.         GUIEditor.button[4] = guiCreateButton(163, 113, 92, 22, "Motor Kapat", false, gui)
  26.         guiSetFont(GUIEditor.button[4], "default-bold-small")
  27.         guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFFFF")
  28.         GUIEditor.label[3] = guiCreateLabel(0, 135, 271, 15, "_______________________________________", false, gui)
  29.         guiLabelSetColor(GUIEditor.label[3], 255, 152, 5)
  30.         GUIEditor.button[5] = guiCreateButton(10, 167, 92, 22, "Aracı Kilitle", false, gui)
  31.         guiSetFont(GUIEditor.button[5], "default-bold-small")
  32.         guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFFFFFF")
  33.         GUIEditor.button[6] = guiCreateButton(163, 167, 92, 22, "Kilit Aç", false, gui)
  34.         guiSetFont(GUIEditor.button[6], "default-bold-small")
  35.         guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFFFFFF")
  36.         GUIEditor.label[4] = guiCreateLabel(88, 299, 198, 31, "Tiryaki Gaming", false, gui)
  37.         guiSetFont(GUIEditor.label[4], "default-bold-small")
  38.         guiLabelSetColor(GUIEditor.label[4], 22, 254, 5)
  39.         GUIEditor.button[7] = guiCreateButton(15, 350, 261, 30, "Kapat", false, gui)
  40.         guiSetFont(GUIEditor.button[7], "default-bold-small")
  41.         guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FF0017FF")
  42.         GUIEditor.label[5] = guiCreateLabel(0, 199, 271, 15, "_______________________________________", false, gui)
  43.         guiLabelSetColor(GUIEditor.label[5], 255, 152, 5)
  44.         Boton_VehicleInfo = guiCreateButton(10, 231, 92, 22, "Araç Bilgisi", false, gui)
  45.         guiSetFont(Boton_VehicleInfo, "default-bold-small")
  46.         guiSetProperty(Boton_VehicleInfo, "NormalTextColour", "FFFFFFFF")
  47.         GUIEditor.button[9] = guiCreateButton(163, 231, 92, 22, "Panel Bilgisi", false, gui)
  48.         guiSetFont(GUIEditor.button[9], "default-bold-small")
  49.         guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFFFFFFF")
  50.         GUIEditor.label[6] = guiCreateLabel(-5, 259, 271, 15, "_______________________________________", false, gui)
  51.         guiLabelSetColor(GUIEditor.label[6], 255, 152, 5)    
  52.     end
  53. )              
  54. function ackapa()
  55. if (guiGetVisible (gui) == true) then --> Paneli aktifleştirme.
  56. guiSetVisible(gui, false) --> Paneli aktifleştirme.
  57. showCursor(false)
  58. elseif (guiGetVisible (gui) == false) then --> Paneli aktifleştirme.
  59. guiSetVisible(gui, true) --> Paneli aktifleştirme.
  60. showCursor(true)
  61. end
  62. end
  63. bindKey("L", "down", ackapa) --> Panelin açma kapama tuşu.
  64.  
  65. gui_info = guiCreateWindow(862, 216, 200, 116, "Vehicle Panel - Araç Bilgisi", false)
  66. guiWindowSetSizable(gui_info, false)
  67.  
  68. Label_Vehicle = guiCreateLabel(10, 29, 44, 15, "Araç : ", false, gui_info)
  69. Labe_VHealth = guiCreateLabel(10, 54, 84, 15, " Hasar : ", false, gui_info)
  70. Valor_Vehicle = guiCreateLabel(64, 29, 129, 15, "none", false, gui_info)
  71. guiLabelSetColor(Valor_Vehicle, 251, 0, 0)
  72. Valor_VehicleH = guiCreateLabel(104, 54, 89, 15, "none", false, gui_info)
  73. guiLabelSetColor(Valor_VehicleH, 251, 0, 0)
  74. Close_Info = guiCreateButton(64, 79, 69, 23, "Kapat", false, gui_info)

Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın Vehicle Panel - Araç Panel


Yazıyo Ben Yapamadım Sen Yapsan  ?
« Son Düzenleme: 07 Mart 2017, 18:41:32 Gönderen: Paradox »
 

Paradox

  • Kurucu
  • *
  • İleti: 639
  • SH Gaming
Ynt: [Yardım] Butana Basınca Başka Panel Açılması ?
« Yanıtla #3 : 07 Mart 2017, 18:46:35 »
Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın
Kod: Lua
  1. GUIEditor = {
  2.     button = {},
  3.     window = {},
  4.     label = {}
  5. }
  6. addEventHandler("onClientResourceStart", resourceRoot,
  7.       function()
  8.         gui = guiCreateWindow(420, 265, 286, 390, "Araç | Kilit | Motor | Far | *_Panel_*", false)
  9.         guiWindowSetSizable(GUIEditor.window[1], false)
  10.         guiSetAlpha(GUIEditor.window[1], 1.00)
  11.         guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFE0000")
  12.         GUIEditor.button[1] = guiCreateButton(10, 56, 92, 22, "Far Aç", false, gui)
  13.         guiSetFont(GUIEditor.button[1], "default-bold-small")
  14.         guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF")
  15.         GUIEditor.button[2] = guiCreateButton(163, 56, 92, 22, "Far Kapat", false, gui)
  16.         guiSetFont(GUIEditor.button[2], "default-bold-small")
  17.         guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFFFFFF")
  18.         GUIEditor.label[1] = guiCreateLabel(0, 78, 271, 15, "_______________________________________", false, gui)
  19.         guiLabelSetColor(GUIEditor.label[1], 255, 152, 5)
  20.         GUIEditor.label[2] = guiCreateLabel(-4, 21, 271, 15, "_______________________________________", false, gui)
  21.         guiLabelSetColor(GUIEditor.label[2], 255, 152, 5)
  22.         GUIEditor.button[3] = guiCreateButton(10, 113, 92, 22, "Motor Aç", false, gui)
  23.         guiSetFont(GUIEditor.button[3], "default-bold-small")
  24.         guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFFFFFF")
  25.         GUIEditor.button[4] = guiCreateButton(163, 113, 92, 22, "Motor Kapat", false, gui)
  26.         guiSetFont(GUIEditor.button[4], "default-bold-small")
  27.         guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFFFF")
  28.         GUIEditor.label[3] = guiCreateLabel(0, 135, 271, 15, "_______________________________________", false, gui)
  29.         guiLabelSetColor(GUIEditor.label[3], 255, 152, 5)
  30.         GUIEditor.button[5] = guiCreateButton(10, 167, 92, 22, "Aracı Kilitle", false, gui)
  31.         guiSetFont(GUIEditor.button[5], "default-bold-small")
  32.         guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFFFFFF")
  33.         GUIEditor.button[6] = guiCreateButton(163, 167, 92, 22, "Kilit Aç", false, gui)
  34.         guiSetFont(GUIEditor.button[6], "default-bold-small")
  35.         guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFFFFFF")
  36.         GUIEditor.label[4] = guiCreateLabel(88, 299, 198, 31, "Tiryaki Gaming", false, gui)
  37.         guiSetFont(GUIEditor.label[4], "default-bold-small")
  38.         guiLabelSetColor(GUIEditor.label[4], 22, 254, 5)
  39.         GUIEditor.button[7] = guiCreateButton(15, 350, 261, 30, "Kapat", false, gui)
  40.         guiSetFont(GUIEditor.button[7], "default-bold-small")
  41.         guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FF0017FF")
  42.         GUIEditor.label[5] = guiCreateLabel(0, 199, 271, 15, "_______________________________________", false, gui)
  43.         guiLabelSetColor(GUIEditor.label[5], 255, 152, 5)
  44.         Boton_VehicleInfo = guiCreateButton(10, 231, 92, 22, "Araç Bilgisi", false, gui)
  45.         guiSetFont(Boton_VehicleInfo, "default-bold-small")
  46.         guiSetProperty(Boton_VehicleInfo, "NormalTextColour", "FFFFFFFF")
  47.         GUIEditor.button[9] = guiCreateButton(163, 231, 92, 22, "Panel Bilgisi", false, gui)
  48.         guiSetFont(GUIEditor.button[9], "default-bold-small")
  49.         guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFFFFFFF")
  50.         GUIEditor.label[6] = guiCreateLabel(-5, 259, 271, 15, "_______________________________________", false, gui)
  51.         guiLabelSetColor(GUIEditor.label[6], 255, 152, 5)    
  52.     end
  53. )              
  54. function ackapa()
  55. if (guiGetVisible (gui) == true) then --> Paneli aktifleştirme.
  56. guiSetVisible(gui, false) --> Paneli aktifleştirme.
  57. showCursor(false)
  58. elseif (guiGetVisible (gui) == false) then --> Paneli aktifleştirme.
  59. guiSetVisible(gui, true) --> Paneli aktifleştirme.
  60. showCursor(true)
  61. end
  62. end
  63. bindKey("L", "down", ackapa) --> Panelin açma kapama tuşu.
  64.  
  65. gui_info = guiCreateWindow(862, 216, 200, 116, "Vehicle Panel - Araç Bilgisi", false)
  66. guiWindowSetSizable(gui_info, false)
  67.  
  68. Label_Vehicle = guiCreateLabel(10, 29, 44, 15, "Araç : ", false, gui_info)
  69. Labe_VHealth = guiCreateLabel(10, 54, 84, 15, " Hasar : ", false, gui_info)
  70. Valor_Vehicle = guiCreateLabel(64, 29, 129, 15, "none", false, gui_info)
  71. guiLabelSetColor(Valor_Vehicle, 251, 0, 0)
  72. Valor_VehicleH = guiCreateLabel(104, 54, 89, 15, "none", false, gui_info)
  73. guiLabelSetColor(Valor_VehicleH, 251, 0, 0)
  74. Close_Info = guiCreateButton(64, 79, 69, 23, "Kapat", false, gui_info)

Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın Vehicle Panel - Araç Panel


Yazıyo Ben Yapamadım Sen Yapsan  ?


Birazda kendin birşeyler safretsen keşke.
Spoiler for Hiden:
Kod: Lua
  1. GUIEditor = {
  2.     button = {},
  3.     window = {},
  4.     label = {}
  5. }
  6. addEventHandler("onClientResourceStart", resourceRoot,
  7.       function()
  8.         gui = guiCreateWindow(420, 265, 286, 390, "Araç | Kilit | Motor | Far | *_Panel_*", false)
  9.         guiWindowSetSizable(GUIEditor.window[1], false)
  10.         guiSetAlpha(GUIEditor.window[1], 1.00)
  11.         guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFE0000")
  12.         GUIEditor.button[1] = guiCreateButton(10, 56, 92, 22, "Far Aç", false, gui)
  13.         guiSetFont(GUIEditor.button[1], "default-bold-small")
  14.         guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF")
  15.         GUIEditor.button[2] = guiCreateButton(163, 56, 92, 22, "Far Kapat", false, gui)
  16.         guiSetFont(GUIEditor.button[2], "default-bold-small")
  17.         guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFFFFFF")
  18.         GUIEditor.label[1] = guiCreateLabel(0, 78, 271, 15, "_______________________________________", false, gui)
  19.         guiLabelSetColor(GUIEditor.label[1], 255, 152, 5)
  20.         GUIEditor.label[2] = guiCreateLabel(-4, 21, 271, 15, "_______________________________________", false, gui)
  21.         guiLabelSetColor(GUIEditor.label[2], 255, 152, 5)
  22.         GUIEditor.button[3] = guiCreateButton(10, 113, 92, 22, "Motor Aç", false, gui)
  23.         guiSetFont(GUIEditor.button[3], "default-bold-small")
  24.         guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFFFFFF")
  25.         GUIEditor.button[4] = guiCreateButton(163, 113, 92, 22, "Motor Kapat", false, gui)
  26.         guiSetFont(GUIEditor.button[4], "default-bold-small")
  27.         guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFFFF")
  28.         GUIEditor.label[3] = guiCreateLabel(0, 135, 271, 15, "_______________________________________", false, gui)
  29.         guiLabelSetColor(GUIEditor.label[3], 255, 152, 5)
  30.         GUIEditor.button[5] = guiCreateButton(10, 167, 92, 22, "Aracı Kilitle", false, gui)
  31.         guiSetFont(GUIEditor.button[5], "default-bold-small")
  32.         guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFFFFFF")
  33.         GUIEditor.button[6] = guiCreateButton(163, 167, 92, 22, "Kilit Aç", false, gui)
  34.         guiSetFont(GUIEditor.button[6], "default-bold-small")
  35.         guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFFFFFF")
  36.         GUIEditor.label[4] = guiCreateLabel(88, 299, 198, 31, "Tiryaki Gaming", false, gui)
  37.         guiSetFont(GUIEditor.label[4], "default-bold-small")
  38.         guiLabelSetColor(GUIEditor.label[4], 22, 254, 5)
  39.         GUIEditor.button[7] = guiCreateButton(15, 350, 261, 30, "Kapat", false, gui)
  40.         guiSetFont(GUIEditor.button[7], "default-bold-small")
  41.         guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FF0017FF")
  42.         GUIEditor.label[5] = guiCreateLabel(0, 199, 271, 15, "_______________________________________", false, gui)
  43.         guiLabelSetColor(GUIEditor.label[5], 255, 152, 5)
  44.         Boton_VehicleInfo = guiCreateButton(10, 231, 92, 22, "Araç Bilgisi", false, gui)
  45.         guiSetFont(Boton_VehicleInfo, "default-bold-small")
  46.         guiSetProperty(Boton_VehicleInfo, "NormalTextColour", "FFFFFFFF")
  47.         GUIEditor.button[9] = guiCreateButton(163, 231, 92, 22, "Panel Bilgisi", false, gui)
  48.         guiSetFont(GUIEditor.button[9], "default-bold-small")
  49.         guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFFFFFFF")
  50.         GUIEditor.label[6] = guiCreateLabel(-5, 259, 271, 15, "_______________________________________", false, gui)
  51.         guiLabelSetColor(GUIEditor.label[6], 255, 152, 5)    
  52.                
  53. gui_info = guiCreateWindow(862, 216, 200, 116, "Vehicle Panel - Araç Bilgisi", false)
  54. guiWindowSetSizable(gui_info, false)
  55. guiSetVisible(gui_info,false)
  56.  
  57. Label_Vehicle = guiCreateLabel(10, 29, 44, 15, "Araç : ", false, gui_info)
  58. Labe_VHealth = guiCreateLabel(10, 54, 84, 15, " Hasar : ", false, gui_info)
  59. Valor_Vehicle = guiCreateLabel(64, 29, 129, 15, "none", false, gui_info)
  60. guiLabelSetColor(Valor_Vehicle, 251, 0, 0)
  61. Valor_VehicleH = guiCreateLabel(104, 54, 89, 15, "none", false, gui_info)
  62. guiLabelSetColor(Valor_VehicleH, 251, 0, 0)
  63. Close_Info = guiCreateButton(64, 79, 69, 23, "Kapat", false, gui_info)         
  64.     end
  65. )              
  66.  
  67. function ackapa()
  68. if (guiGetVisible (gui) == true) then --> Paneli aktifleştirme.
  69. guiSetVisible(gui, false) --> Paneli aktifleştirme.
  70. showCursor(false)
  71. elseif (guiGetVisible (gui) == false) then --> Paneli aktifleştirme.
  72. guiSetVisible(gui, true) --> Paneli aktifleştirme.
  73. showCursor(true)
  74. end
  75. end
  76. bindKey("L", "down", ackapa) --> Panelin açma kapama tuşu.
  77.  
  78. addEventHandler ("onClientGUIClick",root,
  79.     function()
  80.        if (source == Boton_VehicleInfo) then      
  81.         guiSetVisible(gui_info, true)
  82.         guiSetVisible( gui, false )
  83.     end
  84. end
  85. )
 
Mesajı Beğenenler: Cynax, CrAzZyBoY_GiRL