Making a scoreboard like CosmicPvP's old one

  • 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 comminuty!

    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.

SkyDev

Member
Mar 25, 2017
18
0
0
27
Skript Version: Skript 2.2 (dev31b)
Skript Author: Bensku
Minecraft Version: 1.11.2
---
Full Code:
Note: If the code is too large, feel free to use a pasting website (Pastebin or hastebin)
Note: If a variable is being set in another script, but not shown, please explain how they are being set


Code (Skript):
  1. https://hastebin.com/raw/olojelijuw
Errors on Reload:

Code (Skript):
  1. none
Console Errors: (if applicable)

Code (Skript):
  1. none
Other Useful Info:

Addons using (including versions):
SkRambled 1.9

Troubleshooting:

Have you tried searching the docs? Yes
Have you tried searching the forums? No
What other methods have you tried to fix it? I have no idea how to fix this
 
Last edited:
it only shows my own name. My fac has 4 players, but it only shows them their names, and me my name.
remove 1 tab from "loop {facmembers.%name of faction of loop-player%::*}:" section

#edit:

well i looked again your code, this would be errors.

you got 2 option:

#1. option:
You add again a new "loop all players:"

#2. Options

Remove the "every 3 seconds" and replace it into

code_language.skript:
on join:
    while player is online:
        #code
This is much effifency than every 3 seconds.
 
remove 1 tab from "loop {facmembers.%name of faction of loop-player%::*}:" section

#edit:

well i looked again your code, this would be errors.

you got 2 option:

#1. option:
You add again a new "loop all players:"

#2. Options

Remove the "every 3 seconds" and replace it into

code_language.skript:
on join:
    while player is online:
        #code
This is much effifency than every 3 seconds.
thanks for answering, but it doesn't work. maybe i understood wrong, send me a pm or something with the fixed code, please.
bump
 
The scoreboard only shows my name, not also my faction members' names.

code_language.skript:
function updatesidebar(p: player):
    loop all players:
        if "%name of faction of {_p}%" is "%name of faction of loop-player%":
            add loop-player to {_facmember::*}
    wipe {_p}'s sidebar
    set name of sidebar of {_p} to "&b&l« &a%name of faction of {_p}% &b&l»"
    set {_loop} to 0
    loop {_facmember::*}:
        set score "%loop-value%" in sidebar of {_p} to {_loop}
        add 1 to {_loop}
        
on script load:
    while {_} is not set:
        loop all players:
            updatesidebar(loop-player)
        wait 3 seconds
 
code_language.skript:
function updatesidebar(p: player):
    loop all players:
        if "%name of faction of {_p}%" is "%name of faction of loop-player%":
            add loop-player to {_facmember::*}
    wipe {_p}'s sidebar
    set name of sidebar of {_p} to "&b&l« &a%name of faction of {_p}% &b&l»"
    set {_loop} to 0
    loop {_facmember::*}:
        set score "%loop-value%" in sidebar of {_p} to {_loop}
        add 1 to {_loop}
       
on script load:
    while {_} is not set:
        loop all players:
            updatesidebar(loop-player)
        wait 3 seconds
thank you so much! i dont understand how fuctions work yet, but this seems to be working! thank you SO much!
 
Status
Not open for further replies.