on bed enter: if player's world is "world": #ustaw nazwe świata jeśli jest inna set {_players} to amount of all players in world "world" #ustaw nazwe świata jeśli jest inna add player to {sleeping::*} set {_now} to size of {sleeping::*} set {_need} to rounded up (0.5 * {_players}) if {_now} is smaller than {_need}: broadcast "&e%player%&c położył się do łóżka (&e%{_now}%&c/&e{_need}&c)." else: set time in world "world" to 06:00 #ustaw nazwe świata jeśli jest inna broadcast "&e%player%&a położył się do łóżka, powitajmy nowy dzień!" on bed leave: if player's world is "world": #ustaw nazwe świata jeśli jest inna set {_players} to amount of all players in world "world" #ustaw nazwe świata jeśli jest inna remove player from {sleeping::*} set {_now} to size of {sleeping::*} set {_need} to rounded up (0.5 * {_players}) if {_now} is smaller than {_need}: broadcast "&e%player%&c wstał z łóżka (&e%{_now}%&c/&e{_need}&c)." else: set time in world "world" to 06:00 #ustaw nazwe świata jeśli jest inna broadcast "&e%player%&a wstał z łóżka, powitajmy nowy dzień!" on join: if player's world is "world": if player is not sleeping: broadcast "&e%player%&c wszedł na serwer (&e%{_now}%&c/&e{_need}&c)." else: add player to {sleeping::*} set {_players} to amount of all players in world "world" #ustaw nazwe świata jeśli jest inna set {_now} to size of {sleeping::*} if {_now} is smaller than {_need}: broadcast "&e%player%&c wszedł na serwer leżąc w łóżku (&e%{_now}%&c/&e{_need}&c)." else: set time in world "world" to 06:00 #ustaw nazwe świata jeśli jest inna broadcast "&e%player%&a dołączył do gry leżąc w łóżku, powitajmy nowy dzień!" on quit: if player's world is "world": #ustaw nazwe świata jeśli jest inna set {_players} to amount of all players in world "world" #ustaw nazwe świata jeśli jest inna if {sleeping::*} contains player: remove player from {sleeping::*} set {_now} to size of {sleeping::*} set {_need} to rounded up (0.5 * {_players}) if {_now} is smaller than {_need}: broadcast "&e%player%&c wyszedł z serwera (&e%{_now}%&c/&e{_need}&c)." else: set time in world "world" to 06:00 #ustaw nazwe świata jeśli jest inna broadcast "&e%player%&a wyszedł z serwera, powitajmy nowy dzień!"