function dodajCD(p: player, v: text, t: text, s: timespan) :: boolean:
if difference between {cooldown::%{_v}%::%{_p}%} and now is smaller than {_s}:
remove difference between now and {cooldown::%{_v}%::%{_p}%} from {_s}
set {_s} to "%{_s}%"
replace all "seconds" and "second" with "s" in {_s}
replace all "minute" and "minutes" with "m" in {_s}
replace all "hours" and "hour" with "h" in {_s}
send "%{_t}% %{_s}%" to {_p}
return false
else:
set {cooldown::%{_v}%::%{_p}%} to now
return true
command /cobweb [<player>]:
permission: op
trigger:
set {_p} to player if arg 1 is not set else arg 1
give firework star of unbreaking 10 named "&dAnty Cobweb" with lore "&fUsuwa pajęczyny &e3 kratki &fod gracza", and "&7(Możesz użyć co 20s)" to {_p}
on right click:
if name of player's tool is "&dAnty Cobweb":
dodajCD(player, "pajeczyny", "&7Przed następnym użyciem poczekaj&f", 10 seconds) = true
send "&7Użyto &fAnty Cobweba&7!" to player
remove 1 firework star from player
loop all blocks in radius 3 of player where [input is cobweb]:
set loop-block to air
Opis problemu
Ogolnie to przy ladowaniu jakiegos skryptu pokazuje sie ze ta funkcja juz jest w antycobweb.sk a jest tylko 1 antycobweb.sk. probowalem tez usunac reszte skryptow i zostawic tylko ten i dalej sie pokazuje ten blad.
Pytanie
sukinkot241 0
Podstawowe informacje
Kod skryptu
function dodajCD(p: player, v: text, t: text, s: timespan) :: boolean: if difference between {cooldown::%{_v}%::%{_p}%} and now is smaller than {_s}: remove difference between now and {cooldown::%{_v}%::%{_p}%} from {_s} set {_s} to "%{_s}%" replace all "seconds" and "second" with "s" in {_s} replace all "minute" and "minutes" with "m" in {_s} replace all "hours" and "hour" with "h" in {_s} send "%{_t}% %{_s}%" to {_p} return false else: set {cooldown::%{_v}%::%{_p}%} to now return true command /cobweb [<player>]: permission: op trigger: set {_p} to player if arg 1 is not set else arg 1 give firework star of unbreaking 10 named "&dAnty Cobweb" with lore "&fUsuwa pajęczyny &e3 kratki &fod gracza", and "&7(Możesz użyć co 20s)" to {_p} on right click: if name of player's tool is "&dAnty Cobweb": dodajCD(player, "pajeczyny", "&7Przed następnym użyciem poczekaj&f", 10 seconds) = true send "&7Użyto &fAnty Cobweba&7!" to player remove 1 firework star from player loop all blocks in radius 3 of player where [input is cobweb]: set loop-block to airOpis problemu
Ogolnie to przy ladowaniu jakiegos skryptu pokazuje sie ze ta funkcja juz jest w antycobweb.sk a jest tylko 1 antycobweb.sk. probowalem tez usunac reszte skryptow i zostawic tylko ten i dalej sie pokazuje ten blad.
Odnośnik do komentarza
https://skript.pl/temat/59028-potrzebuje-pomocy/Udostępnij na innych stronach
0 odpowiedzi na to pytanie
Rekomendowane odpowiedzi
Dołącz do dyskusji
Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.