Solved wierd sidebar thing

  • Welcome to skUnity!

    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 community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Potato

Active Member
Feb 24, 2020
57
1
0
So i put the information of the loop player in the sidebar, and when someone new joins the scoreboard of every player changes to the recent player that joined's stats.

SKRIPT:

Code:
function refreshScoreboard(p: Player):
    set {_u} to {_p}'s uuid
    wipe {_p}'s sidebar
    set name of sidebar of {_p} to "&e&lMud"
    set score "&7&fSeason I" in sidebar of {_p} to 11
    set score "&7" in sidebar of {_p} to 10
    set score "&e &e&l%name of {_p}%" in sidebar of {_p} to 9
    set score "&r &7 &fBalance: &c$%{balance::%{_u}%}%" in sidebar of {_p} to 8
    set score "&r &7 &fLevel: &a%{level::%{_u}%}%" in sidebar of {_p} to 7
    set score "&r &7 &fXP: &3%{xpprogress::%{_u}%}%%%" in sidebar of {_p} to 6
    set score "&e&5" in sidebar of {_p} to 5
    set score "&e &e&lServer" in sidebar of {_p} to 4
    set score "&r &7 &fOnline: &e%number of all players%&6/20" in sidebar of {_p} to 3
    set score "&r &7 &fUnique: &e%number of all offline players%" in sidebar of {_p} to 2
    set score "&r&7" in sidebar of {_p} to 1

every 5 seconds:
    loop all players:
        refreshScoreboard(loop-player)
 
And if you try add this to your code?:

code_language.skript:
function refreshScoreboard(p: Player):
    set {_u} to {_p}'s uuid
    wipe {_p}'s sidebar
    set name of sidebar of {_p} to "&e&lMud"
    set score "&7&fSeason I" in sidebar of {_p} to 11
    set score "&7" in sidebar of {_p} to 10
    set score "&e &e&l%name of {_p}%" in sidebar of {_p} to 9
    set score "&r &7 &fBalance: &c$%{balance::%{_u}%}%" in sidebar of {_p} to 8
    set score "&r &7 &fLevel: &a%{level::%{_u}%}%" in sidebar of {_p} to 7
    set score "&r &7 &fXP: &3%{xpprogress::%{_u}%}%%%" in sidebar of {_p} to 6
    set score "&e&5" in sidebar of {_p} to 5
    set score "&e &e&lServer" in sidebar of {_p} to 4
    set score "&r &7 &fOnline: &e%number of all players%&6/20" in sidebar of {_p} to 3
    set score "&r &7 &fUnique: &e%number of all offline players%" in sidebar of {_p} to 2
    set score "&r&7" in sidebar of {_p} to 1

on join:
    while player is online:
        refreshScoreboard(player) 
        wait 5 seconds
 
And if you try add this to your code?:

code_language.skript:
function refreshScoreboard(p: Player):
    set {_u} to {_p}'s uuid
    wipe {_p}'s sidebar
    set name of sidebar of {_p} to "&e&lMud"
    set score "&7&fSeason I" in sidebar of {_p} to 11
    set score "&7" in sidebar of {_p} to 10
    set score "&e &e&l%name of {_p}%" in sidebar of {_p} to 9
    set score "&r &7 &fBalance: &c$%{balance::%{_u}%}%" in sidebar of {_p} to 8
    set score "&r &7 &fLevel: &a%{level::%{_u}%}%" in sidebar of {_p} to 7
    set score "&r &7 &fXP: &3%{xpprogress::%{_u}%}%%%" in sidebar of {_p} to 6
    set score "&e&5" in sidebar of {_p} to 5
    set score "&e &e&lServer" in sidebar of {_p} to 4
    set score "&r &7 &fOnline: &e%number of all players%&6/20" in sidebar of {_p} to 3
    set score "&r &7 &fUnique: &e%number of all offline players%" in sidebar of {_p} to 2
    set score "&r&7" in sidebar of {_p} to 1

on join:
    while player is online:
        refreshScoreboard(player)
        wait 5 seconds
Thanks for your reply, i have not checked if it worked, but that looks like the "error". I did it though. Thanks!
 
Status
Not open for further replies.