Çözüldü AFK Engelleme Skripti

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Kod:
every 15 minutes:
    checkAFK()

function checkAFK():
    loop all players:
        set {kick::%loop-players%} to true
        send loop-player title "&a%{kick::code}%" with subtitle "&6Kodu 20 Saniye İçerisinde Sohbet Yaz!" for 19 seconds to
    set {kick::code} to a random integer between 999 and 99999
    set {kick::check} to true
    wait 20 seconds
    loop all players:
        if {kick::%loop-player%} is set:
            kick loop-player due to "AFK"
    delete {kick::*}
    stop

on chat:
    if {kick::check} is set:
        if message is "%{kick::code}%":
            delete {kick::%player%}
            send player title "Doğrulamadan Geçtin." for 3 seconds

Böyle diyor:

1693312873825.png


Baya uğraştırdım hocam sizi umarım hata benden dolayı değildir
 
JavaScript:
send title "&a%{kick::code}%" with subtitle "&6Kodu 20 Saniye İçerisinde Sohbet Yaz!" to loop-player for 19 seconds
olarak kullanın
 
JavaScript:
send title "&a%{kick::code}%" with subtitle "&6Kodu 20 Saniye İçerisinde Sohbet Yaz!" to loop-player for 19 seconds
olarak kullanın
Çalıştı ancak üstteki kod title'ında <none> yazıyor
 
Çalıştı ancak üstteki kod title'ında <none> yazıyor
Kod:
set {kick::code} to a random integer between 999 and 99999
Kodunu
Kod:
function checkAFK():
Kodunun altına taşıyın.
 
İnternette bunu buldum;
(Hata alırsan paylaş yardımcı olurum)
on load: # Ayarlar define afkTime as 300 # Saniye cinsinden AFK zaman limiti (örneğin 300 saniye = 5 dakika) define kickMessage as "Oyundan atıldınız: AFK kaldınız." every 1 second: loop all players: if {_} is not afk: # Oyuncu zaten AFK değilse if {_}'s last location is different from {_}'s location: # Oyuncu hareket ettiyse set {_}'s last location to {_}'s location else: if {_}'s afk timer is not set: # Oyuncu AFK olmadan önce ilk kez kontrol ediliyorsa set {_}'s afk timer to now else if now minus {_}'s afk timer is greater than afkTime: # AFK süresi limiti aşıldıysa kick {_} due to kickMessage else: if {_}'s last location is different from {_}'s location: # Oyuncu hareket ettiyse set {_} is not afk set {_}'s last location to {_}'s location
 
bu kodu da kullanabilirsiniz loop players kullanmadan yaptım
JavaScript:
every 15 minutes:
    add all players to {afktest::*}
    set {code} to random integer between 999 and 99999
    send title "&6%{code}%" with subtitle "&fKodu Sohbete Gir!" to all players for 20 seconds
    wait 20 seconds
    kick {afktest::*} due to "Afk olduğun için atıldın!"
    clear {afktest::*} and {code}

on chat:
    {code} is set
    if message = {code}:
        cancel event
        reset title
        send title "&aBAŞARILI" with subtitle "&fAfk testini geçtin"
        remove player from {afktest::*}
 
@Edoux ve @SilentCobbra hocam ikinize de çok teşekkürler.
Sonuç olarak birleştirip şöyle bir şey çıkardım başka kullanacak olan olursa diye:

SCSS:
every 15 minutes:
    checkAFK()


function checkAFK():
    set {kick::code} to a random integer between 999 and 99999
    loop all players:
        set {kick::%loop-players%} to true
        send title "&a%{kick::code}%" with subtitle "&6Kodu 20 Saniye İçerisinde Sohbet Yaz!" to loop-player for 19 seconds
    set {kick::check} to true
    wait 20 seconds
    loop all players:
        if {kick::%loop-player%} is set:
            kick loop-player due to "AFK"
    delete {kick::*}
    stop


on chat:
    if {kick::check} is set:
        if message is "%{kick::code}%":
            delete {kick::%player%}
            message "&b&4AFK onayından geçtin."
            cancel event

Tekrar teşekkürler.
 
Son düzenleme:
@Edoux ve @SilentCobbra hocam ikinize de çok teşekkürler.
Sonuç olarak birleştirip şöyle bir şey çıkardım başka kullanacak olan olursa diye:

SCSS:
every 15 minutes:
    checkAFK()


function checkAFK():
    set {kick::code} to a random integer between 999 and 99999
    loop all players:
        set {kick::%loop-players%} to true
        send title "&a%{kick::code}%" with subtitle "&6Kodu 20 Saniye İçerisinde Sohbet Yaz!" to loop-player for 19 seconds
    set {kick::check} to true
    wait 20 seconds
    loop all players:
        if {kick::%loop-player%} is set:
            kick loop-player due to "AFK"
    delete {kick::*}
    stop


on chat:
    if {kick::check} is set:
        if message is "%{kick::code}%":
            delete {kick::%player%}
            message "&b&4AFK onayından geçtin."
            cancel event

Tekrar teşekkürler.
Skript yerine
Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.
eklentisini kullanmanız daha sağlıklı olacaktır.
 
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