Hi, I am trying to have like, online players in world. https://prnt.sc/titwsl https://prnt.sc/titx7k
Please help, I need this fast!
Please help, I need this fast!
Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.
If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!
Now, what are you waiting for? Join the community now!
You can always check out skUnity Downloads for downloads and any other information about Skript!
I sent the fileplease
send skript code
# this is one add
loop all players in world "world1": # Change every name in the world with the worlds you want
add loop-player to {_players1::*}
set {_online1} to size of {_players1::*}
loop all players in world "world2": # Change every name in the world with the worlds you want
add loop-player to {_players2::*}
set {_online2} to size of {_players2::*}
loop all players in world "world3": # Change every name in the world with the worlds you want
add loop-player to {_players3::*}
set {_online3} to size of {_players3::*}
wait 0.2 ticks
command /lobbysel:
trigger:
loop all players in world "world1": #Change every name in the world with the worlds you want
add loop-player to {_players1::*}
set {_online1} to size of {_players1::*}
loop all players in world "world2":
add loop-player to {_players2::*}
set {_online2} to size of {_players2::*}
loop all players in world "world3":
add loop-player to {_players3::*}
set {_online3} to size of {_players3::*}
wait 0.2 ticks
open chest with 3 rows named "&a&lLobby Selector" to player
format slot 0 of player with 160:7 named " " to close
format slot 1 of player with 160:7 named " " to close
format slot 2 of player with 160:7 named " " to close
format slot 3 of player with 160:7 named " " to close
format slot 4 of player with 160:7 named " " to close
format slot 5 of player with 160:7 named " " to close
format slot 6 of player with 160:7 named " " to close
format slot 7 of player with 160:7 named " " to close
format slot 8 of player with 160:7 named " " to close
format slot 9 of player with 160:7 named " " to close
format slot 10 of player with 399 named "&a&lHub 1" with lore "&3Connect to:||&bHub 1||&b%{_online1}%" to close then run [make player execute command "ehub"]
format slot 11 of player with 160:7 named " " to close
format slot 12 of player with 160:7 named " " to close
format slot 13 of player with 399 named "&a&lHub 2" with lore "&3Connect to:||&bHub 2||&b%{_online2}%" to close then run [make player execute command "warp hub2"]
format slot 14 of player with 160:7 named " " to close
format slot 15 of player with 160:7 named " " to close
format slot 16 of player with 399 named "&a&lHub 3" with lore "&3Connect to:||&bHub 3||&b%{_online3}%" to close then run [make player execute command "warp hub3"]
format slot 17 of player with 160:7 named " " to close
format slot 18 of player with 160:7 named " " to close
format slot 19 of player with 160:7 named " " to close
format slot 20 of player with 160:7 named " " to close
format slot 21 of player with 160:7 named " " to close
format slot 22 of player with 160:7 named " " to close
format slot 23 of player with 160:7 named " " to close
format slot 24 of player with 160:7 named " " to close
format slot 25 of player with 160:7 named " " to close
format slot 26 of player with 160:7 named " " to close
ok thank you!Try with this
Code:# this is one add loop all players in world "world1": # Change every name in the world with the worlds you want add loop-player to {_players1::*} set {_online1} to size of {_players1::*} loop all players in world "world2": # Change every name in the world with the worlds you want add loop-player to {_players2::*} set {_online2} to size of {_players2::*} loop all players in world "world3": # Change every name in the world with the worlds you want add loop-player to {_players3::*} set {_online3} to size of {_players3::*} wait 0.2 ticks
Code:command /lobbysel: trigger: loop all players in world "world1": #Change every name in the world with the worlds you want add loop-player to {_players1::*} set {_online1} to size of {_players1::*} loop all players in world "world2": add loop-player to {_players2::*} set {_online2} to size of {_players2::*} loop all players in world "world3": add loop-player to {_players3::*} set {_online3} to size of {_players3::*} wait 0.2 ticks open chest with 3 rows named "&a&lLobby Selector" to player format slot 0 of player with 160:7 named " " to close format slot 1 of player with 160:7 named " " to close format slot 2 of player with 160:7 named " " to close format slot 3 of player with 160:7 named " " to close format slot 4 of player with 160:7 named " " to close format slot 5 of player with 160:7 named " " to close format slot 6 of player with 160:7 named " " to close format slot 7 of player with 160:7 named " " to close format slot 8 of player with 160:7 named " " to close format slot 9 of player with 160:7 named " " to close format slot 10 of player with 399 named "&a&lHub 1" with lore "&3Connect to:||&bHub 1||&b%{_online1}%" to close then run [make player execute command "ehub"] format slot 11 of player with 160:7 named " " to close format slot 12 of player with 160:7 named " " to close format slot 13 of player with 399 named "&a&lHub 2" with lore "&3Connect to:||&bHub 2||&b%{_online2}%" to close then run [make player execute command "warp hub2"] format slot 14 of player with 160:7 named " " to close format slot 15 of player with 160:7 named " " to close format slot 16 of player with 399 named "&a&lHub 3" with lore "&3Connect to:||&bHub 3||&b%{_online3}%" to close then run [make player execute command "warp hub3"] format slot 17 of player with 160:7 named " " to close format slot 18 of player with 160:7 named " " to close format slot 19 of player with 160:7 named " " to close format slot 20 of player with 160:7 named " " to close format slot 21 of player with 160:7 named " " to close format slot 22 of player with 160:7 named " " to close format slot 23 of player with 160:7 named " " to close format slot 24 of player with 160:7 named " " to close format slot 25 of player with 160:7 named " " to close format slot 26 of player with 160:7 named " " to close
Try with this
Code:# this is one add loop all players in world "world1": # Change every name in the world with the worlds you want add loop-player to {_players1::*} set {_online1} to size of {_players1::*} loop all players in world "world2": # Change every name in the world with the worlds you want add loop-player to {_players2::*} set {_online2} to size of {_players2::*} loop all players in world "world3": # Change every name in the world with the worlds you want add loop-player to {_players3::*} set {_online3} to size of {_players3::*} wait 0.2 ticks
thank you!Code:if {_online1} is not set: set {_online1} to 0 if {_online2} is not set: set {_online2} to 0 if {_online3} is not set: set {_online3} to 0
every 5 seconds:
[/LIST]
if {_online1} is not set:
set {_online1} to 0
if {_online2} is not set:
set {_online2} to 0
if {_online3} is not set:
set {_online3} to 0
command /lobbysel:
trigger:
loop all players in world "world1": #Change every name in the world with the worlds you want
add loop-player to {_players1::*}
set {_online1} to size of {_players1::*}
loop all players in world "world2":
add loop-player to {_players2::*}
set {_online2} to size of {_players2::*}
loop all players in world "world3":
add loop-player to {_players3::*}
set {_online3} to size of {_players3::*}
if {_online1} is not set:
set {_online1} to 0
if {_online2} is not set:
set {_online2} to 0
if {_online3} is not set:
set {_online3} to 0
wait 0.2 ticks
open chest with 3 rows named "&a&lLobby Selector" to player
format slot 0 of player with 160:7 named " " to close
format slot 1 of player with 160:7 named " " to close
format slot 2 of player with 160:7 named " " to close
format slot 3 of player with 160:7 named " " to close
format slot 4 of player with 160:7 named " " to close
format slot 5 of player with 160:7 named " " to close
format slot 6 of player with 160:7 named " " to close
format slot 7 of player with 160:7 named " " to close
format slot 8 of player with 160:7 named " " to close
format slot 9 of player with 160:7 named " " to close
format slot 10 of player with 399 named "&a&lHub 1" with lore "&3Connect to:||&bHub 1||&b%{_online1}%" to close then run [make player execute command "ehub"]
format slot 11 of player with 160:7 named " " to close
format slot 12 of player with 160:7 named " " to close
format slot 13 of player with 399 named "&a&lHub 2" with lore "&3Connect to:||&bHub 2||&b%{_online2}%" to close then run [make player execute command "warp hub2"]
format slot 14 of player with 160:7 named " " to close
format slot 15 of player with 160:7 named " " to close
format slot 16 of player with 399 named "&a&lHub 3" with lore "&3Connect to:||&bHub 3||&b%{_online3}%" to close then run [make player execute command "warp hub3"]
format slot 17 of player with 160:7 named " " to close
format slot 18 of player with 160:7 named " " to close
format slot 19 of player with 160:7 named " " to close
format slot 20 of player with 160:7 named " " to close
format slot 21 of player with 160:7 named " " to close
format slot 22 of player with 160:7 named " " to close
format slot 23 of player with 160:7 named " " to close
format slot 24 of player with 160:7 named " " to close
format slot 25 of player with 160:7 named " " to close
format slot 26 of player with 160:7 named " " to close