Çözüldü Skript İle Menüde Sağ Tık ve Sol Tık

  • Konuyu Başlatan Konuyu Başlatan bingo
  • Başlangıç tarihi Başlangıç tarihi
  • Görüntüleme 996
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

bingo

Birisi mi Spawnlandı?
Katılım
16 Mart 2018
Mesajlar
2
Elmaslar
0
Puan
0
Yaş
28
Ben skript ile bir menü yaptım
Menüde market ayarladım
Marketteki eşyalra sağ tıklanınca alınsın sol tıklanınca satılsın shift ile yapılınca 16 tane alınıp satılsın istiyorum
Nasıl Yaparım?
 
ShopGui+ eklentisini kullanabilirsin.
 
Kod:
function changeName(p: Player, clicktype: String):
    set {_number} to name of slot 4 of {_p}'s current inventory parsed as number #Requires SkQuery or Bensku's fork
    if {_clicktype} is "left":
        remove 1 from {_number}
    else if {_clicktype} is "shift left":
        remove 100 from {_number}
    else if {_clicktype} is "right":
        add 1 to {_number}
    else if {_clicktype} is "shift right":
        add 100 to {_number}
    set name of slot 4 of {_p}'s current inventory to "%{_number}%"

command /multiactionExample:
    trigger:
        open virtual dispenser inventory named "Multi-action example" to player
        set {_item} to diamond named "1"
        set line 1 of lore of {_item} to "&7Left click: remove 1"
        set line 2 of lore of {_item} to "&7Shift left click: remove 100"
        set line 3 of lore of {_item} to "&7Right click: add 1"
        set line 4 of lore of {_item} to "&7Shift right click: add 100"
        format gui slot 4 of player with {_item} to run function changeName(player, "left") with "left" click
        format gui slot 4 of player with {_item} to run function changeName(player, "shift left") with "shift left" click
        format gui slot 4 of player with {_item} to run function changeName(player, "right") with "right" click
        format gui slot 4 of player with {_item} to run function changeName(player, "shift right") with "shift right" click

Alıntıdır. Buradan yola çıkarak halledebilirsin.
 
Kod:
function changeName(p: Player, clicktype: String):
    set {_number} to name of slot 4 of {_p}'s current inventory parsed as number #Requires SkQuery or Bensku's fork
    if {_clicktype} is "left":
        remove 1 from {_number}
    else if {_clicktype} is "shift left":
        remove 100 from {_number}
    else if {_clicktype} is "right":
        add 1 to {_number}
    else if {_clicktype} is "shift right":
        add 100 to {_number}
    set name of slot 4 of {_p}'s current inventory to "%{_number}%"

command /multiactionExample:
    trigger:
        open virtual dispenser inventory named "Multi-action example" to player
        set {_item} to diamond named "1"
        set line 1 of lore of {_item} to "&7Left click: remove 1"
        set line 2 of lore of {_item} to "&7Shift left click: remove 100"
        set line 3 of lore of {_item} to "&7Right click: add 1"
        set line 4 of lore of {_item} to "&7Shift right click: add 100"
        format gui slot 4 of player with {_item} to run function changeName(player, "left") with "left" click
        format gui slot 4 of player with {_item} to run function changeName(player, "shift left") with "shift left" click
        format gui slot 4 of player with {_item} to run function changeName(player, "right") with "right" click
        format gui slot 4 of player with {_item} to run function changeName(player, "shift right") with "shift right" click

Alıntıdır. Buradan yola çıkarak halledebilirsin.
Çok Teşekkürler gerçekten işime yaradı sağol
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Hala Discord sunucumuza katılmadın mı?

Büyük bir topluluğun parçası ol, etkinliklere katıl ve özel hediyeler kazanma şansı yakala!

Şimdi Katıl
Üst