Bulundu Komut yazdırma

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Rangna13

Demir Cevheri Gibiyim
Katılım
2 Şubat 2025
Mesajlar
190
Elmaslar
90
Puan
1.220
Yaş
25
Konum
Ankara
Minecraft
Rangna13

Discord:

Rangna13

1.21.4 kullanıyorum bir skripte ihtiyacım var sk.gonder permi olan bir oyuncu /gonder arg1 text yazınca arg 1 texti yazmış olsun texti de /server skyblock /server survival /server mythcore olarak kısıtlayabilirmiyiz

Kod:
command /gonder <player> <text>:

    permission: sk.gonder

    permission message: &cYetkin yok!

    trigger:

        set {_sunucu} to lowercase "%argument 2%"



        if {_sunucu} is not "skyblock":

            if {_sunucu} is not "survival":

                if {_sunucu} is not "mythcore":

                    send "&cSadece şunları kullanabilirsin: &7skyblock, survival, mythcore" to player

                    stop



        make argument 1 execute command "/server %{_sunucu}%"



        send "&a%argument 1% oyuncusu %{_sunucu}% sunucusuna gönderildi."

böyle bir şey yazmayı denedim fakat çalışmadı
 
Moderatör tarafından düzenlendi:
Kod:
command /gonder [<offline player>] [<text>]:
    permission: sk.gonder
    permission message: &cYetkin yok!
    usage: &c/gonder <oyuncu> <sunucu>
    trigger:
        # Argüman kontrolü
        if arg-1 is not set:
            send "&c/gonder <oyuncu> <sunucu>"
            stop
        if arg-2 is not set:
            send "&c/gonder <oyuncu> <sunucu>"
            stop

        # Sunucu adını küçük harfe çevir
        set {_sunucu} to arg-2 in lower case

        # Sadece izin verilen sunucular
        if {_sunucu} is not "skyblock", "survival" or "mythcore":
            send "&cSadece şunları kullanabilirsin: &7skyblock, survival, mythcore"
            stop

        # Hedef oyuncu online mı?
        if arg-1 is not online:
            send "&c%arg-1% oyuncusu çevrimdışı!"
            stop

        # Oyuncuya komutu çalıştırt
        make arg-1 execute command "server %{_sunucu}%"
        send "&a%arg-1% oyuncusu &e%{_sunucu}% &asunucusuna gönderildi."
 
1.21.4 kullanıyorum bir skripte ihtiyacım var sk.gonder permi olan bir oyuncu /gonder arg1 text yazınca arg 1 texti yazmış olsun texti de /server skyblock /server survival /server mythcore olarak kısıtlayabilirmiyiz

Kod:
command /gonder <player> <text>:

    permission: sk.gonder

    permission message: &cYetkin yok!

    trigger:

        set {_sunucu} to lowercase "%argument 2%"



        if {_sunucu} is not "skyblock":

            if {_sunucu} is not "survival":

                if {_sunucu} is not "mythcore":

                    send "&cSadece şunları kullanabilirsin: &7skyblock, survival, mythcore" to player

                    stop



        make argument 1 execute command "/server %{_sunucu}%"



        send "&a%argument 1% oyuncusu %{_sunucu}% sunucusuna gönderildi."

böyle bir şey yazmayı denedim fakat çalışmadı
Yazdığın kod mantık olarak doğru görünse de, 1.21.4 gibi güncel sürümlerde ve özellikle BungeeCord/Velocity altyapılarında make player execute command veya execute command satırları bazen takılabiliyor.
Ayrıca yazdığın iç içe if yapısı yerine or kullanmak kodu hem hızlandırır hem de okunabilir kılar. İşte çalışmamasının muhtemel sebepleri ve düzeltilmiş, en güncel hali:



Kod:
command /gonder <player> <text>:
    permission: sk.gonder
    permission message: &cYetkin yok!
    usage: &7Kullanım: &e/gonder <oyuncu> <skyblock/survival/mythcore>
    trigger:
        set {_sunucu} to arg-2
        
        # Sunucu kontrolü (Daha temiz bir yöntem)
        if {_sunucu} is not "skyblock" or "survival" or "mythcore":
            send "&cSadece şunları kullanabilirsin: &7skyblock, survival, mythcore" to player
            stop

        # Oyuncuya komutu kullandırıyoruz
        # Not: Eğer BungeeCord kullanıyorsan 'force' gerekebilir
        force arg-1 to execute command "/server %{_sunucu}%"

        send "&a%arg-1% &7oyuncusu &e%{_sunucu}% &7sunucusuna gönderildi." to player
 
tamamdır teşekkürler konu kilitlenebilir
 
Skript'e gerek yok bunun için, Essentails var ise /sudo komutu ile zaten yapabilirsiniz. Ayrıca velocityde gerekli kurulumlarınız var ise /send komutu ile oyuncuyu istediğiniz sunucuya gönderebilirsiniz.
 
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