Skocz do zawartości
  • 0

Broadcast


GreenForce12

Pytanie

4 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
function sendCenterText(p: player, t: text):
	set {_spaces} to ""
	loop (rounded down ((80 - (1.4 * (length of {_t})))/2)) times:
		set {_spaces} to "%{_spaces}% "
	send "%{_spaces}%%{_t}%" to {_p}
	
command /ce [<text="test">]:
	trigger:
		sendCenterText(executor, arg)

jedynie mozna dac spacje przed zdanie

Odnośnik do komentarza
https://skript.pl/temat/37748-broadcast/#findComment-239580
Udostępnij na innych stronach

  • 0
14 minut temu, GreenForce12 napisał:

on death:
	if attacker is a player:
		if victim is wither:
			broadcast "&c%attacker% &6zabil withera!"  ###<--- To ma być wyśrodkowane

a jeżeli to tutaj miałoby być wyśrodkowane?

function sendCenterText(p: players, t: text):
	set {_spaces} to ""
	loop (rounded down ((80 - (1.4 * (length of {_t})))/2)) times:
		set {_spaces} to "%{_spaces}% "
	send "%{_spaces}%%{_t}%" to {_p::*}
	
on death:
	if attacker is a player:
		if victim is wither:
			sendCenterText((all players), ("&c%attacker% &6zabil withera!"))
Odnośnik do komentarza
https://skript.pl/temat/37748-broadcast/#findComment-239586
Udostępnij na innych stronach

  • 0
26 minut temu, GreenForce12 napisał:

on death:
	if attacker is a player:
		if victim is wither:
			broadcast "&c%attacker% &6zabil withera!"  ###<--- To ma być wyśrodkowane

a jeżeli to tutaj miałoby być wyśrodkowane?

function getCenterText(t: text) :: texts:
	set {_spaces} to ""
	loop (rounded down ((80 - (1.4 * (length of {_t})))/2)) times:
		set {_spaces} to "%{_spaces}% "
	return "%{_spaces}%%{_t}%"
		
on death:
	if attacker is a player:
		if victim is wither:
			broadcast getCenterText("&c%attacker% &6zabil withera!")

aa juz maruda podał xD

Edytowane przez xAxee
Odnośnik do komentarza
https://skript.pl/temat/37748-broadcast/#findComment-239589
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ę...