#can someone help with the scoreboard skript

1 messages · Page 1 of 1 (latest)

plain burrow
#

on death of player:
add 1 to {stats.deaths.%victim%}
if attacker is a player:
add 1 to {stats.kills.%attacker%}
updateScoreboard(attacker)
updateScoreboard(victim)

on join:
wait 2 ticks
updateScoreboard(player)

function updateScoreboard(p):
set name of scoreboard "GoatsGen" to "&eGoatsGen"
set display name of scoreboard "GoatsGen" to "&eGoatsGen"
set sidebar of {_p} to scoreboard "GoatsGen"
set score "&bPlayer: &f%{_p}%" in scoreboard "GoatsGen" to 5
set {_kills} to {stats.kills.%{_p}%}
set {_deaths} to {stats.deaths.%{_p}%}
set {_kdr} to 0
if {_deaths} > 0:
set {_kdr} to {_kills} / {_deaths}
else if {_kills} > 0:
set {_kdr} to {_kills}
set score "&6KDR: &f%{_kdr}%" in scoreboard "GoatsGen" to 4
set score "&cKills: &f%{_kills}%" in scoreboard "GoatsGen" to 3
set score "&7Deaths: &f%{_deaths}%" in scoreboard "GoatsGen" to 2
set score "&aPing: &f%{_p}'s ping%" in scoreboard "GoatsGen" to 1

dim bear
#

format your code, and explain whats wrong, and maybe

zealous iris
#

Its supposed to be p: player