fZq4WbT2
Język: Skript
|
Autor: YoLoDavcio
options: tag: &8&m--------&8[ &8» &c&lYoLo&7&lDavcio &8« &8]&8&m-------- ilesekund: 5 command /chat [<text>]: trigger: if arg 1 is not set: send "&cPoprawne uzycie: /Chat <On> <Off> <Clear>" if arg 1 is "on": set {_chat} to yaml value "chat" from file "zmienne/serwer.yml" if {_chat} is not set: if player has permission "chat.*": set yaml value "chat" from file "zmienne/serwer.yml" to "true" broadcast "" broadcast " {@tag}" broadcast " &7Chat zostal &fWlaczony" broadcast " {@tag}" stop else: send "&8» &cNie masz uprawnien do tej komendy." stop else: send "&8» &cChat jest juz Wlaczony" stop if arg 1 is "off": set {_chat} to yaml value "chat" from file "zmienne/serwer.yml" if {_chat} is set: if player has permission "chat.*": delete yaml value "chat" from file "zmienne/serwer.yml" broadcast "" broadcast " {@tag}" broadcast " &7Chat zostal &fWylaczony" broadcast " {@tag}" stop else: send "&8» &cNie masz uprawnien do tej komendy." stop else: send "&8» &cChat jest juz Wylaczony" stop if arg 1 is "clear": if player has permission "chat.*": loop 100 times: broadcast " " broadcast " {@tag}" broadcast " &7Chat zostal &2&nWyczyszczony!" broadcast " {@tag}" stop else: send "&8» &cNie masz uprawnien do tej komendy." stop on chat: set {_chat} to yaml value "chat" from file "zmienne/serwer.yml" if {_chat} is not set: if player has permission "chat.pisz.admin": stop else: cancel event send "&8» &cKolego! chat jest aktualnie wylaczony :(" stop else: if player has permission "chat.pisz.vip": stop set {_spam.%player%} to yaml value "spam" from file "zmienne/%uuid of player%.yml" set {_waited} to difference between {_spam.%player%} and now if {_waited} is less than {@ilesekund} real seconds seconds: send "&cNie spamuj!" cancel event stop set yaml value "spam" from file "zmienne/%uuid of player%.yml" to "%now%" stop Options: czas_co_ile_mozna_pisac: 5 on chat: set {_waited} to difference between {spam.%player%.lastused} and now if player has permission "admin.skript.czat": stop else: if {_waited} is less than {@czas_co_ile_mozna_pisac} seconds: message "&c&lYoLo&7&lDavcio &8- &7Mozesz pisac na czacie co &a{@czas_co_ile_mozna_pisac}&7 sekund!" cancel event stop set {spam.%player%.lastused} to now