Skocz do zawartości
  • 0

chat


Szybki_Johny

Pytanie

Witam, dopisze ktoś że gracz może co 5 sek pisać na chacie ??

kod:

command /chat [<text>] [<text>]:
	trigger:
		if player has permission "Parcc.core.Chat":
			if arg 1 is empty:
				send "&2ULTRA&fHC &7Poprawne uzycie: &a&o/chat &8(&3off&8/&3on&8/&3c&8)" to player
			else if arg 1 is "on":
				if {chat.stan} is true:
					send "&fULTRA&2HC &7Chat jest juz wlaczony" to player
					stop trigger
				set {chat.stan} to true
				broadcast "                &fULTRA&2HC"
				broadcast " &8» &7Chat zostal wlaczony przez &3%player%"
			else if arg 1 is "off":
				if {chat.stan} is false:
					send "&fULTRA&2HC &cChat jest juz wylaczony" to player
					stop trigger
				set {chat.stan} to false
				loop 100 times:
					broadcast " "
				broadcast "                 &fULTRA&2HC"
				broadcast "&8» &7Chat zostal wylaczony przez &a%player% &7powod: &8(&3 %arg 2% &8)"

			else if arg 1 is "c":
				loop 100 times:
					broadcast " "
				broadcast "                 &fULTRA&2HC"
				broadcast "&8» &7Chat zostal wyczyszczony przez &a%player%"
			else:
				send "&fULTRA&2HC &8» &7Poprawne uzycie &a&o/chat &8(&3off&8/&3on&8/&3c&8)" to player
			stop trigger
		else:
			send "&fULTRA&2HC &8» &c&lNie masz permissji"
			
command /cc:
	trigger:
		if player has permission "chat.cc":
			loop 100 times:
				broadcast " "
			broadcast "                  &fULTRA&2HC"
			broadcast "&8» &7Chat zostal wyczyszczony przez &a%player%"
		else:
			send "&fULTRA&2HC &8» &c&lNie masz permissji!"
		

on chat:
	if {chat.stan} is false:
		if player has permission "chat.vip":
			stop trigger
		else:
			cancel event
			send "&fULTRA&2HC &8» &7Chat jest aktualnie wylaczony"
			send "&fULTRA&2HC &7Jedyne co mozesz to poprosic Admina o wloczenie chatu !"
			stop 

 

Odnośnik do komentarza
https://skript.pl/temat/27119-chat/
Udostępnij na innych stronach

2 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

on chat:
    if {chat.stan} is false:
        if player has permission "chat.vip":
            if {chatWr::%player%} is not set:
                set {chatWr::%player%} to now
            else if difference between {chatWr::%player%} and now >= 5 seconds:
                set {chatWr::%player%} to now
            else:
                send "&cMozesz pisac za &e%difference between 5 seconds and (difference between {chatWr::%player%} and now)%"
            stop
        else:
            cancel event
            send "&fULTRA&2HC &8» &7Chat jest aktualnie wylaczony"
            send "&fULTRA&2HC &7Jedyne co mozesz to poprosic Admina o wloczenie chatu !"
            stop 
    if {chatWr::%player%} is not set:
        set {chatWr::%player%} to now
    else if difference between {chatWr::%player%} and now >= 5 seconds:
        set {chatWr::%player%} to now
    else:
        send "&cMozesz pisac za &e%difference between 5 seconds and (difference between {chatWr::%player%} and now)%"

Odnośnik do komentarza
https://skript.pl/temat/27119-chat/#findComment-178719
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...