Scoreboard doesnt update

  • 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.

BuqTheBuq

New Member
Apr 23, 2020
7
0
1
Hello, my scoreboard isn't updating. take a look at it, and please help me with it


command /o0oscoreboardo0o123:
trigger:
set name of sidebar of player to "&6FFA Scoreboard"
set score "Kills: %{kills.%player%}%" in sidebar of player to 4
set score "Deaths: %{deaths.%player%}%" in sidebar of player to 3
set score "Streak: %{streak.%player%}%" in sidebar of player to 2
set score "Top Streak: %{topstreak.%player%}%" in sidebar of player to 1

on death:
player is in "FFA1"
victim is a player
attacker is a player
add 1 to {kills.%attacker%}
add 1 to {deaths.%victim%}
add 1 to {streak.%attacker%}
set {streak.%victim%} to 0
if {streak.%attacker%} is greater than {topstreak.%attacker%}:
set {topstreak.%attacker%} to {streak.%attacker%}
on first join:
set {kills.%player%} to 0
set {deaths.%player%} to 0
set {streak.%player%} to 0
set {topstreak.%player%} to 0
 
H
Hello, my scoreboard isn't updating. take a look at it, and please help me with it


command /o0oscoreboardo0o123:
trigger:
set name of sidebar of player to "&6FFA Scoreboard"
set score "Kills: %{kills.%player%}%" in sidebar of player to 4
set score "Deaths: %{deaths.%player%}%" in sidebar of player to 3
set score "Streak: %{streak.%player%}%" in sidebar of player to 2
set score "Top Streak: %{topstreak.%player%}%" in sidebar of player to 1

on death:
player is in "FFA1"
victim is a player
attacker is a player
add 1 to {kills.%attacker%}
add 1 to {deaths.%victim%}
add 1 to {streak.%attacker%}
set {streak.%victim%} to 0
if {streak.%attacker%} is greater than {topstreak.%attacker%}:
set {topstreak.%attacker%} to {streak.%attacker%}
on first join:
set {kills.%player%} to 0
set {deaths.%player%} to 0
set {streak.%player%} to 0
set {topstreak.%player%} to 0
Hi, here's the code, you need SkRayFall addon for this syntax.
Code:
on join:
    if {kills.%player%} is not set:
        set {kills.%player%} to 0

    if {deaths.%player%} is not set:
        set {deaths.%player%} to 0

    if {streak.%player%} is not set:
        set {streak.%player%} to 0

    if {topstreak.%player%} is not set:
        set {topstreak.%player%} to 0

    wait 1 second

    set name of sidebar of player to "&6FFA Scoreboard"
    create id score "Kills: %{kills.%player%}%" in sidebar of player to 4 with id "%player%-line4"
    create id score "Deaths: %{deaths.%player%}%" in sidebar of player to 3 with id "%player%-line3"
    create id score "Streak: %{streak.%player%}%" in sidebar of player to 2 with id "%player%-line2"
    create id score "Top Streak: %{topstreak.%player%}%" in sidebar of player to 1 with id "%player%-line1"

on quit:
    wipe player's sidebar
    loop 4 times:
        remove score id "%player%-line%loop-number%"

on death of a player:
    if attakcer is a player:
        if victim is a player:
            add 1 to {kills.%attacker%}
            add 1 to {deaths.%victim%}
            add 1 to {streak.%attacker%}
            set {streak.%victim%} to 0

            if {streak.%attacker%} is greater than {topstreak.%attacker%}:
                set {topstreak.%attacker%} to {streak.%attacker%}

            update score id "%attacker%-line4" to "Kills: %{kills.%attacker%}%" and 4
            update score id "%attacker%-line3" to "Deaths: %{deaths.%attacker%}%" and 3
            update score id "%attacker%-line2" to "Streak: %{streak.%attacker%}%" and 2
            update score id "%attacker%-line1" to "Top Streak: %{topstreak.%attacker%}%" and 1

            update score id "%victim%-line4" to "Kills: %{kills.%victim%}%" and 4
            update score id "%victim%-line3" to "Deaths: %{deaths.%victim%}%" and 3
            update score id "%victim%-line2" to "Streak: %{streak.%victim%}%" and 2
            update score id "%victim%-line1" to "Top Streak: %{topstreak.%victim%}%" and 1
 
Status
Not open for further replies.