Bulundu Basit bir skript isteği

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

ByZiya

MrNinja -> ByZiya
Katılım
26 Aralık 2015
Mesajlar
427
Elmaslar
206
Puan
0
Konum
Konya
Merhaba MC-TR, sizden bir skript istiyorum. Bu skript chata adam hack yazdığında mesaj gitmesin ve ekrana hile koruması var yazmasını istiyorum. Teşekkürler, iyi forumlar.
 
Kod:
on chat "hack"
    cancel event
    exute consle command "/tm msg &4Hack Koruması Var"
,

Olmasa Soyle
 
Kod:
import org.bukkit.ChatColor;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin implements Listener {

    public void onEnable(){
        getServer().getPluginManager().registerEvents(this, this);
    }

    @EventHandler
    public void onPlayerChat(AsyncPlayerChatEvent event){
        if(event.getMessage().contains("hack")){
            event.getPlayer().sendMessage(ChatColor.RED+"Hile korumamız nedeniyle mesajınız gönderilmemiştir.");
            event.setCancelled(true);
        }
    }
}

Java hali böyle bir şey olsa gerek ama test etmedim
 
PHP:
on chat:
    if message contains "hack":
        send "&cKoruma &4> &c"&eHack&c" &eKelimesini kullanmak yasaktir ." to player
        cancel events
 
PHP:
on chat:
    if message contains "hack":
        send "&cKoruma &4> &c"&eHack&c" &eKelimesini kullanmak yasaktir ." to player
        cancel events
Skript de mesaj yollarken iki tane çift tırnak (") koyarsan hata verir.
Buyurun
PHP:
on chat:
  if message contains "hack" or "hacker" or "hax" or "ha.ck" or "hac.ker":
    cancel event
    send "&6Server &aSunucuda &cHack &akorumasi mevcuttur.
Eğer yazdığı zaman susturulmasını istiyorsan buyur,
PHP:
on chat:
  if {sustur.%player%} is true:
    cancel event
    send "&6Server &cSusturuldun! &a{sure.%parameter 1%.dakika}&7:&a{sure.%parameter 1%.saniye} &csonra konusabilirsin."
  if message contains "hack" or "hacker" or "hax" or "ha.ck" or "hac.ker":
    cancel event
    send "&6Server &aSunucuda &cHack &akorumasi mevcuttur.
    invoke "sustur" from player

sub "sustur":
  set {sustur.%parameter 1%} to true
  set {sure.%parameter 1%.dakika} to 15
  set {sure.%parameter 1%.saniye} to 60
  set {_x} to true
  while {_x} is true:
    remove 1 from {sure.%parameter 1%.saniye}
    if {sure.%parameter 1%.saniye} is equal to 0:
      set {sure.%parameter 1%.saniye} to 60
      remove 1 from {sure.%parameter 1%.dakika}
    if {sure.%parameter 1%.dakika} is equal to 0:
      if {sure.%parameter 1%.saniye} is equal to 0:
        set {sustur.%parameter 1%} to false
 
Herkese teşekkürler, bazı hatalar vardı kendim düzelttim. Konu kilitlenebilir. Allah Razı Olsun Hepinizden.
 
Sorun çözüldüğüne göre konu kilit, iyi forumlar.
 
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