# Funkcje function create(): if file "WH/config.yml" doesn't exist: create file "WH/config.yml" set yaml value "config.Włączona" from file "WH/config.yml" to "nie" set yaml value "config.Wiadomość wyrzucenia" from file "WH/config.yml" to "§c§l Aktualnie włączona jest whitelista, spróbuj ponownie później" set yaml value "config.Admin może wejść (whadmin)" from file "WH/config.yml" to "nie" set yaml value "info.Header1" from file "WH/config.yml" to "&c&l====================" set yaml value "info.Wersja" from file "WH/config.yml" to "&6&l1.0" set yaml value "info.Autor" from file "WH/config.yml" to "&c&lHoli&b&lBENC" else: stop function load(): exists of "WH/config.yml" is true: set {wł} to yaml value "config.Włączona" from file "WH/config.yml" set {kickms} to yaml value "config.Wiadomość wyrzucenia" from file "WH/config.yml" set {admin.w} to yaml value "config.Admin może wejść (whadmin)" from file "WH/config.yml" set {h1} to yaml value "info.Header1" from file "WH/config.yml" set {wer} to yaml value "info.Wersja" from file "WH/config.yml" set {autor} to yaml value "info.Autor" from file "WH/config.yml" else: create() # Komendy command /wh [] []: permission: whadmin trigger: if arg 1 is "info": send "%{h1}%" to player send "&c&lWersja skryptu: %{wer}%" to player send "&c&lAutorem jest: %{autor}%" to player send "%{h1}%" if arg 1 is "add": if {wł} is "tak": if arg 2 is set: if exists of "WH/Gracze/%arg 2%.wh" is false: create file "WH/Gracze/%arg 2%.wh" send "&c&l Pomyślnie dodałeś gracza &6&l%arg 2% &c&ldo whitelisty" else: send "&c&l Ten gracz jest już na whiteliście" else: send "&c&l Poprawne użycie /wh add " else: send "&c&l Whitelista jest wyłączona. Użyj komendy | /wh on | aby ją włączyć" else if arg 1 is "on": if {wł} is "nie": set yaml value "config.Włączona" from file "WH/config.yml" to "tak" load() if {wł} is "tak": send "&c&l Pomyślnie właczyłeś whiteliste" else: send "&c&l Whitelista jest już włączona" else if arg 1 is "off": if {wł} is "tak": set yaml value "config.Włączona" from file "WH/config.yml" to "nie" load() if {wł} is "nie": send "&c&l Pomyślnie wyłączyłeś whiteliste" else: send "&c&l Whitelista jest już wyłączona" else if arg 1 is "delete": if arg 2 is set: if exists of "WH/Gracze/%arg 2%.wh" is true: delete file "WH/Gracze/%arg 2%.wh" send "&c&l Pomyślnie usunąłeś gracza &6&l%arg 2% &c&lz whitelisty" else: send "&c&l Ten gracz nie jest na whiteliście" # Eventy on connect: if {wł} is "tak": if {admin.w} is "nie": if exists of "WH/Gracze/%player%.wh" is false: kick player due to "%{kickms}%" else: stop else: if player has permission "whadmin": stop else: kick player due to "%{kickms}%" else: stop on command "whitelist": cancel event execute player command "wh %arguments%" on load: create() load()