[YARDIM] Butona Basınca Başka Panel Açılması

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı #Serius

  • Uzman Üye
  • *
    • İleti: 685
Butona basınca başka panel açılmasını istiyorum. Kodunu atarsanız sevinirim.
« Son Düzenleme: 07 Mart 2017, 20:42:18 Gönderen: Narkoz »
 


MTASATURK

[YARDIM] Butona Basınca Başka Panel Açılması
« : 07 Mart 2017, 16:53:18 »

Çevrimdışı Cynax

  • #
  • Deneyimli Üye
  • *
    • İleti: 470
  • Bıraktı
Yanıtla #1 : 07 Mart 2017, 16:57:31
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
addEventHandler ("onClientGUIClick",root,
    function()
       if (source == buton1) then       
        guiSetVisible(panel1, true)
        guiSetVisible( panel2, false )
       elseif (source == buton2) then       
        guiSetVisible(panel1, false)
        guiSetVisible(panel2, true)
    end
end
)
 


Çevrimdışı #Serius

  • Uzman Üye
  • *
    • İleti: 685
Yanıtla #2 : 07 Mart 2017, 17:24:55
Kod: lua
GUIEditor = {
    button = {},
    window = {},
    label = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
      function()
        gui = guiCreateWindow(420, 265, 286, 390, "Araç | Kilit | Motor | Far | *_Panel_*", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 1.00)
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFE0000")
        GUIEditor.button[1] = guiCreateButton(10, 56, 92, 22, "Far Aç", false, gui)
        guiSetFont(GUIEditor.button[1], "default-bold-small")
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[2] = guiCreateButton(163, 56, 92, 22, "Far Kapat", false, gui)
        guiSetFont(GUIEditor.button[2], "default-bold-small")
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFFFFFF")
        GUIEditor.label[1] = guiCreateLabel(0, 78, 271, 15, "_______________________________________", false, gui)
        guiLabelSetColor(GUIEditor.label[1], 255, 152, 5)
        GUIEditor.label[2] = guiCreateLabel(-4, 21, 271, 15, "_______________________________________", false, gui)
        guiLabelSetColor(GUIEditor.label[2], 255, 152, 5)
        GUIEditor.button[3] = guiCreateButton(10, 113, 92, 22, "Motor Aç", false, gui)
        guiSetFont(GUIEditor.button[3], "default-bold-small")
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[4] = guiCreateButton(163, 113, 92, 22, "Motor Kapat", false, gui)
        guiSetFont(GUIEditor.button[4], "default-bold-small")
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFFFF")
        GUIEditor.label[3] = guiCreateLabel(0, 135, 271, 15, "_______________________________________", false, gui)
        guiLabelSetColor(GUIEditor.label[3], 255, 152, 5)
        GUIEditor.button[5] = guiCreateButton(10, 167, 92, 22, "Aracı Kilitle", false, gui)
        guiSetFont(GUIEditor.button[5], "default-bold-small")
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[6] = guiCreateButton(163, 167, 92, 22, "Kilit Aç", false, gui)
        guiSetFont(GUIEditor.button[6], "default-bold-small")
        guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFFFFFF")
        GUIEditor.label[4] = guiCreateLabel(88, 299, 198, 31, "Tiryaki Gaming", false, gui)
        guiSetFont(GUIEditor.label[4], "default-bold-small")
        guiLabelSetColor(GUIEditor.label[4], 22, 254, 5)
        GUIEditor.button[7] = guiCreateButton(15, 350, 261, 30, "Kapat", false, gui)
        guiSetFont(GUIEditor.button[7], "default-bold-small")
        guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FF0017FF")
        GUIEditor.label[5] = guiCreateLabel(0, 199, 271, 15, "_______________________________________", false, gui)
        guiLabelSetColor(GUIEditor.label[5], 255, 152, 5)
        Boton_VehicleInfo = guiCreateButton(10, 231, 92, 22, "Araç Bilgisi", false, gui)
        guiSetFont(Boton_VehicleInfo, "default-bold-small")
        guiSetProperty(Boton_VehicleInfo, "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[9] = guiCreateButton(163, 231, 92, 22, "Panel Bilgisi", false, gui)
        guiSetFont(GUIEditor.button[9], "default-bold-small")
        guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFFFFFFF")
        GUIEditor.label[6] = guiCreateLabel(-5, 259, 271, 15, "_______________________________________", false, gui)
        guiLabelSetColor(GUIEditor.label[6], 255, 152, 5)   
    end
)
function ackapa()
if (guiGetVisible (gui) == true) then --> Paneli aktifleştirme.
guiSetVisible(gui, false) --> Paneli aktifleştirme.
showCursor(false)
elseif (guiGetVisible (gui) == false) then --> Paneli aktifleştirme.
guiSetVisible(gui, true) --> Paneli aktifleştirme.
showCursor(true)
end
end
bindKey("L", "down", ackapa) --> Panelin açma kapama tuşu.

gui_info = guiCreateWindow(862, 216, 200, 116, "Vehicle Panel - Araç Bilgisi", false)
guiWindowSetSizable(gui_info, false)

Label_Vehicle = guiCreateLabel(10, 29, 44, 15, "Araç : ", false, gui_info)
Labe_VHealth = guiCreateLabel(10, 54, 84, 15, " Hasar : ", false, gui_info)
Valor_Vehicle = guiCreateLabel(64, 29, 129, 15, "none", false, gui_info)
guiLabelSetColor(Valor_Vehicle, 251, 0, 0)
Valor_VehicleH = guiCreateLabel(104, 54, 89, 15, "none", false, gui_info)
guiLabelSetColor(Valor_VehicleH, 251, 0, 0)
Close_Info = guiCreateButton(64, 79, 69, 23, "Kapat", false, gui_info)

Linki görebilmek için Kayıt olun yada Giriş yapın. Vehicle Panel - Araç Panel


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


Çevrimdışı Paradox

  • Kurucu
  • *
    • İleti: 684
  • SH Gaming
Yanıtla #3 : 07 Mart 2017, 17:40:24
Linki görebilmek için Kayıt olun yada Giriş yapın.
Kod: lua
GUIEditor = {
    button = {},
    window = {},
    label = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
      function()
        gui = guiCreateWindow(420, 265, 286, 390, "Araç | Kilit | Motor | Far | *_Panel_*", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 1.00)
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFE0000")
        GUIEditor.button[1] = guiCreateButton(10, 56, 92, 22, "Far Aç", false, gui)
        guiSetFont(GUIEditor.button[1], "default-bold-small")
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[2] = guiCreateButton(163, 56, 92, 22, "Far Kapat", false, gui)
        guiSetFont(GUIEditor.button[2], "default-bold-small")
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFFFFFF")
        GUIEditor.label[1] = guiCreateLabel(0, 78, 271, 15, "_______________________________________", false, gui)
        guiLabelSetColor(GUIEditor.label[1], 255, 152, 5)
        GUIEditor.label[2] = guiCreateLabel(-4, 21, 271, 15, "_______________________________________", false, gui)
        guiLabelSetColor(GUIEditor.label[2], 255, 152, 5)
        GUIEditor.button[3] = guiCreateButton(10, 113, 92, 22, "Motor Aç", false, gui)
        guiSetFont(GUIEditor.button[3], "default-bold-small")
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[4] = guiCreateButton(163, 113, 92, 22, "Motor Kapat", false, gui)
        guiSetFont(GUIEditor.button[4], "default-bold-small")
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFFFF")
        GUIEditor.label[3] = guiCreateLabel(0, 135, 271, 15, "_______________________________________", false, gui)
        guiLabelSetColor(GUIEditor.label[3], 255, 152, 5)
        GUIEditor.button[5] = guiCreateButton(10, 167, 92, 22, "Aracı Kilitle", false, gui)
        guiSetFont(GUIEditor.button[5], "default-bold-small")
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[6] = guiCreateButton(163, 167, 92, 22, "Kilit Aç", false, gui)
        guiSetFont(GUIEditor.button[6], "default-bold-small")
        guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFFFFFF")
        GUIEditor.label[4] = guiCreateLabel(88, 299, 198, 31, "Tiryaki Gaming", false, gui)
        guiSetFont(GUIEditor.label[4], "default-bold-small")
        guiLabelSetColor(GUIEditor.label[4], 22, 254, 5)
        GUIEditor.button[7] = guiCreateButton(15, 350, 261, 30, "Kapat", false, gui)
        guiSetFont(GUIEditor.button[7], "default-bold-small")
        guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FF0017FF")
        GUIEditor.label[5] = guiCreateLabel(0, 199, 271, 15, "_______________________________________", false, gui)
        guiLabelSetColor(GUIEditor.label[5], 255, 152, 5)
        Boton_VehicleInfo = guiCreateButton(10, 231, 92, 22, "Araç Bilgisi", false, gui)
        guiSetFont(Boton_VehicleInfo, "default-bold-small")
        guiSetProperty(Boton_VehicleInfo, "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[9] = guiCreateButton(163, 231, 92, 22, "Panel Bilgisi", false, gui)
        guiSetFont(GUIEditor.button[9], "default-bold-small")
        guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFFFFFFF")
        GUIEditor.label[6] = guiCreateLabel(-5, 259, 271, 15, "_______________________________________", false, gui)
        guiLabelSetColor(GUIEditor.label[6], 255, 152, 5)   
    end
)
function ackapa()
if (guiGetVisible (gui) == true) then --> Paneli aktifleştirme.
guiSetVisible(gui, false) --> Paneli aktifleştirme.
showCursor(false)
elseif (guiGetVisible (gui) == false) then --> Paneli aktifleştirme.
guiSetVisible(gui, true) --> Paneli aktifleştirme.
showCursor(true)
end
end
bindKey("L", "down", ackapa) --> Panelin açma kapama tuşu.

gui_info = guiCreateWindow(862, 216, 200, 116, "Vehicle Panel - Araç Bilgisi", false)
guiWindowSetSizable(gui_info, false)

Label_Vehicle = guiCreateLabel(10, 29, 44, 15, "Araç : ", false, gui_info)
Labe_VHealth = guiCreateLabel(10, 54, 84, 15, " Hasar : ", false, gui_info)
Valor_Vehicle = guiCreateLabel(64, 29, 129, 15, "none", false, gui_info)
guiLabelSetColor(Valor_Vehicle, 251, 0, 0)
Valor_VehicleH = guiCreateLabel(104, 54, 89, 15, "none", false, gui_info)
guiLabelSetColor(Valor_VehicleH, 251, 0, 0)
Close_Info = guiCreateButton(64, 79, 69, 23, "Kapat", false, gui_info)

Linki görebilmek için Kayıt olun yada 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
GUIEditor = {
    button = {},
    window = {},
    label = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
      function()
        gui = guiCreateWindow(420, 265, 286, 390, "Araç | Kilit | Motor | Far | *_Panel_*", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 1.00)
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFE0000")
        GUIEditor.button[1] = guiCreateButton(10, 56, 92, 22, "Far Aç", false, gui)
        guiSetFont(GUIEditor.button[1], "default-bold-small")
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[2] = guiCreateButton(163, 56, 92, 22, "Far Kapat", false, gui)
        guiSetFont(GUIEditor.button[2], "default-bold-small")
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFFFFFF")
        GUIEditor.label[1] = guiCreateLabel(0, 78, 271, 15, "_______________________________________", false, gui)
        guiLabelSetColor(GUIEditor.label[1], 255, 152, 5)
        GUIEditor.label[2] = guiCreateLabel(-4, 21, 271, 15, "_______________________________________", false, gui)
        guiLabelSetColor(GUIEditor.label[2], 255, 152, 5)
        GUIEditor.button[3] = guiCreateButton(10, 113, 92, 22, "Motor Aç", false, gui)
        guiSetFont(GUIEditor.button[3], "default-bold-small")
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[4] = guiCreateButton(163, 113, 92, 22, "Motor Kapat", false, gui)
        guiSetFont(GUIEditor.button[4], "default-bold-small")
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFFFF")
        GUIEditor.label[3] = guiCreateLabel(0, 135, 271, 15, "_______________________________________", false, gui)
        guiLabelSetColor(GUIEditor.label[3], 255, 152, 5)
        GUIEditor.button[5] = guiCreateButton(10, 167, 92, 22, "Aracı Kilitle", false, gui)
        guiSetFont(GUIEditor.button[5], "default-bold-small")
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[6] = guiCreateButton(163, 167, 92, 22, "Kilit Aç", false, gui)
        guiSetFont(GUIEditor.button[6], "default-bold-small")
        guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFFFFFF")
        GUIEditor.label[4] = guiCreateLabel(88, 299, 198, 31, "Tiryaki Gaming", false, gui)
        guiSetFont(GUIEditor.label[4], "default-bold-small")
        guiLabelSetColor(GUIEditor.label[4], 22, 254, 5)
        GUIEditor.button[7] = guiCreateButton(15, 350, 261, 30, "Kapat", false, gui)
        guiSetFont(GUIEditor.button[7], "default-bold-small")
        guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FF0017FF")
        GUIEditor.label[5] = guiCreateLabel(0, 199, 271, 15, "_______________________________________", false, gui)
        guiLabelSetColor(GUIEditor.label[5], 255, 152, 5)
        Boton_VehicleInfo = guiCreateButton(10, 231, 92, 22, "Araç Bilgisi", false, gui)
        guiSetFont(Boton_VehicleInfo, "default-bold-small")
        guiSetProperty(Boton_VehicleInfo, "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[9] = guiCreateButton(163, 231, 92, 22, "Panel Bilgisi", false, gui)
        guiSetFont(GUIEditor.button[9], "default-bold-small")
        guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFFFFFFF")
        GUIEditor.label[6] = guiCreateLabel(-5, 259, 271, 15, "_______________________________________", false, gui)
        guiLabelSetColor(GUIEditor.label[6], 255, 152, 5)   

gui_info = guiCreateWindow(862, 216, 200, 116, "Vehicle Panel - Araç Bilgisi", false)
guiWindowSetSizable(gui_info, false)
guiSetVisible(gui_info,false)
 
Label_Vehicle = guiCreateLabel(10, 29, 44, 15, "Araç : ", false, gui_info)
Labe_VHealth = guiCreateLabel(10, 54, 84, 15, " Hasar : ", false, gui_info)
Valor_Vehicle = guiCreateLabel(64, 29, 129, 15, "none", false, gui_info)
guiLabelSetColor(Valor_Vehicle, 251, 0, 0)
Valor_VehicleH = guiCreateLabel(104, 54, 89, 15, "none", false, gui_info)
guiLabelSetColor(Valor_VehicleH, 251, 0, 0)
Close_Info = guiCreateButton(64, 79, 69, 23, "Kapat", false, gui_info)
    end
)               

function ackapa()
if (guiGetVisible (gui) == true) then --> Paneli aktifleştirme.
guiSetVisible(gui, false) --> Paneli aktifleştirme.
showCursor(false)
elseif (guiGetVisible (gui) == false) then --> Paneli aktifleştirme.
guiSetVisible(gui, true) --> Paneli aktifleştirme.
showCursor(true)
end
end
bindKey("L", "down", ackapa) --> Panelin açma kapama tuşu.

addEventHandler ("onClientGUIClick",root,
    function()
       if (source == Boton_VehicleInfo) then       
        guiSetVisible(gui_info, true)
        guiSetVisible( gui, false )
    end
end
)