#Top Damage List
1 messages · Page 1 of 1 (latest)
and instead of setting the var to 0 when youre done with it, you can just delete it
so I should switch every variable to global?
oh hang on i missread the code
i dont hink you need the loop, just set {_sorted::*} to sorted indices of {damage::*} in descending order
and its only showing one player because you use attacker in the loop instead of loop-player
on death:
if victim is {zombie}:
wait 1 tick
set {_sorted::*} to sorted indices of {_damage::*} in descending order
send "&b&lBOSS DAMAGE" to attacker
loop first 3 elements of {_sorted::*}:
send "%loop-iteration%. %loop-player% %{_damage::%loop-value%::*}%" to attacker
wait 1 tick
set {damage::%attacker's uuid%} to 0```
?
The damage list should be the global one