Skocz do zawartości
  • 0

CZY DA SIĘ ZABLOKOWAĆ MOŻLIWOŚĆ RZUCANIA TNT NA SPAWN?


Pytanie

5 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Daj od razu po evencie w skrypcie na rzucane tnt:

if "%region at player%" contain "spawn":

Przykład:

on rightclick with tnt:
	if "%region at player%" contain "spawn":
		cancel event
		send "&cUzywanie na spawnie jest nie dozwolone!" to the player
	// Dalszy skrypt na rzucane tnt

Do tego bodajże jest wymagany plugin PirateSK.

  • 0

Nie działa. A może dam Ci cały skrypt a ty go przerobisz?

on rightclick:
        if name of player's tool is "&4Rzucane TnT":
        set yaml value "tnt" from file "zmienne/%uuid of player%.yml" to "true"
        shoot a TNT from player with speed 0.4
        remove 1 tnt named "&4Rzucane TnT" from player
        wait 2 second
        delete yaml value "tnt" from file "zmienne/%uuid of player%.yml"

on place tnt:
    set {_tnt.%player%} to yaml value "tnt" from file "zmienne/%uuid of player%.yml"
    if {_tnt.%player%} is "true":
        cancel event
        stop

on script load:
    register new shaped recipe for TNT of infinity 1 named "&4Rzucane TnT" using iron ingot, iron ingot, iron ingot, iron ingot, tnt, iron ingot, iron ingot, iron ingot, iron ingot

 

Edytowane przez LjayPL789
bludis

Wstawiam w code.

Notatka dodana przez bludis

  • 0
on rightclick:
    if name of player's tool is "&4Rzucane TnT":
        set {_x} to "%region at player%"
        if {_x} isn't "nazwa_regionu":
            set yaml value "tnt" from file "zmienne/%uuid of player%.yml" to "true"
            shoot a TNT from player with speed 0.4
            remove 1 tnt named "&4Rzucane TnT" from player
            wait 2 second
            delete yaml value "tnt" from file "zmienne/%uuid of player%.yml"

on place tnt:
    set {_tnt.%player%} to yaml value "tnt" from file "zmienne/%uuid of player%.yml"
    if {_tnt.%player%} is "true":
        cancel event
        stop

on script load:
    register new shaped recipe for TNT of infinity 1 named "&4Rzucane TnT" using iron ingot, iron ingot, iron ingot, iron ingot, tnt, iron ingot, iron ingot, iron ingot, iron ingot

Tam gdzie jest 'nazwa_regionu' wpisz nazwę regionu, na którym znajduję się spawn.

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ę...