Skray Posted January 26, 2021 Share Posted January 26, 2021 I need help with a scoreboard, I have skript and SkRayFall. Ranks I am using Permission Ex, essentials. Look: &b-------------------------------- Name: <player's name> Rank: <rank> Mined blocks: <mined blocks> Kills: <kills> Deaths: <deaths> &b-------------------------------- I also need help with something like: on kill: add 1 to {deaths : :*} but idk how to make that. Please help! Link to comment Share on other sites More sharing options...
cupcake346 Posted January 26, 2021 Share Posted January 26, 2021 for the on kill its this: on death: attacker is a player victim is a player add 1 to {kill.%attacker%} this will add 1 kill to the player who killed someone Link to comment Share on other sites More sharing options...
Skray Posted January 27, 2021 Author Share Posted January 27, 2021 And for death, can you do that? But when you fall into the void you wont get a death. Link to comment Share on other sites More sharing options...
D4isDAVID Posted January 27, 2021 Share Posted January 27, 2021 on death: victim is a player add 1 to {deaths::%victim%} attacker is a player add 1 to {kills::%attacker%} Link to comment Share on other sites More sharing options...
CoolProgrammer Posted January 27, 2021 Share Posted January 27, 2021 (edited) every 3 seconds: loop all players: wipe loop-player's sidebar set {_uuid} to loop-player's uuid set name of loop-player's sidebar to "&3&lServer" set score "&b----------------" in loop-player's sidebar to 7 set score "&7Name: &f%loop-player's name%" in loop-player's sidebar to 6 set score "&7Rank: &f%loop-player's group%" in loop-player's sidebar to 5 set score "&7Mined Blocks: &f%{playerdata::%{_uuid}%::mined} ? 0%" in loop-player's sidebar to 4 set score "&7Kills: &f%{playerdata::%{_uuid}%::kills} ? 0%" in loop-player's sidebar to 3 set score "&7Deaths: &f%{playerdata::%{_uuid}%::deaths} ? 0%" in loop-player's sidebar to 2 set score "&b----------------" in loop-player's sidebar to 1 on death of player: set {_v} to victim's uuid set {_a} to attacker's uuid add 1 to {playerdata::%{_v}%::deaths} add 1 to {playerdata::%{_a}%::kills} if {_a} is set on break: set {_uuid} to player's uuid add 1 to {playerdata::%{_uuid}%::mined} Untested. Also, you need Vault plugin for player's rank to show up. There you go. Edited January 27, 2021 by CoolProgrammer Hello there! If you're reading this, hope you're having a wonderful day! Feel free to contact me via Discord (CoolProgrammer#1920) for any help. My DMs are always open for help. You can also message via. forum messages for help. Also, don't hesitate to leave a like on my post if I helped you in any way. Link to comment Share on other sites More sharing options...
Skray Posted January 27, 2021 Author Share Posted January 27, 2021 Thank you so much! Do I need a thing like that for kills too? ↓ Also do you know how to add play time into the scoreboard? on death of player: set {_v} to victim's uuid set {_a} to attacker's uuid add 1 to {playerdata::%{_v}%::deaths} add 1 to {playerdata::%{_a}%::kills} if {_a} is set Link to comment Share on other sites More sharing options...
Skray Posted January 27, 2021 Author Share Posted January 27, 2021 Also @CoolProgrammer the Quote set score "&7Rank: &f%loop-player's group%" in loop-player's sidebar to 5 can I change the %loop-player's group% to %loop-player's prefix%? Link to comment Share on other sites More sharing options...
citeful Posted January 27, 2021 Share Posted January 27, 2021 Here's a pretty good tutorial on scoreboards - Link to comment Share on other sites More sharing options...
CoolProgrammer Posted January 27, 2021 Share Posted January 27, 2021 6 hours ago, Skray said: Thank you so much! Do I need a thing like that for kills too? ↓ Also do you know how to add play time into the scoreboard? on death of player: set {_v} to victim's uuid set {_a} to attacker's uuid add 1 to {playerdata::%{_v}%::deaths} add 1 to {playerdata::%{_a}%::kills} if {_a} is set Of course! This is the way you do it: # There is a better way of doing this, but this will work for now: on first join: set {playerdata::%{_uuid}%::playtime} to 0 seconds every 1 minute: loop all players: add 1 minute to {playerdata::%loop-player's uuid%::playtime} And here is the final code: every 3 seconds: loop all players: wipe loop-player's sidebar set {_uuid} to loop-player's uuid set name of loop-player's sidebar to "&3&lServer" set score "&b----------------" in loop-player's sidebar to 8 set score "&7Name: &f%loop-player%" in loop-player's sidebar to 7 set score "&7Rank: &f%loop-player's group%" in loop-player's sidebar to 6 set score "&7Mined Blocks: &f%{playerdata::%{_uuid}%::mined} ? 0%" in loop-player's sidebar to 5 set score "&7Kills: &f%{playerdata::%{_uuid}%::kills} ? 0%" in loop-player's sidebar to 4 set score "&7Deaths: &f%{playerdata::%{_uuid}%::deaths} ? 0%" in loop-player's sidebar to 3 set score "&7Playtime: &f%{playerdata::%{_uuid}%::playtime}%" in loop-player's sidebar to 2 set score "&b----------------" in loop-player's sidebar to 1 on death of player: set {_v} to victim's uuid set {_a} to attacker's uuid add 1 to {playerdata::%{_v}%::deaths} add 1 to {playerdata::%{_a}%::kills} if {_a} is set on break: set {_uuid} to player's uuid add 1 to {playerdata::%{_uuid}%::mined} on first join: set {playerdata::%{_uuid}%::playtime} to 0 seconds every 1 minute: loop all players: add 1 minute to {playerdata::%loop-player's uuid%::playtime} Again, note that it's untested, and I expect you to read and go though this code to find how it works. Happy learning! Hello there! If you're reading this, hope you're having a wonderful day! Feel free to contact me via Discord (CoolProgrammer#1920) for any help. My DMs are always open for help. You can also message via. forum messages for help. Also, don't hesitate to leave a like on my post if I helped you in any way. Link to comment Share on other sites More sharing options...
Rip_juice_wrld Posted February 3, 2021 Share Posted February 3, 2021 On 1/27/2021 at 10:55 AM, CoolProgrammer said: Of course! This is the way you do it: # There is a better way of doing this, but this will work for now: on first join: set {playerdata::%{_uuid}%::playtime} to 0 seconds every 1 minute: loop all players: add 1 minute to {playerdata::%loop-player's uuid%::playtime} And here is the final code: every 3 seconds: loop all players: wipe loop-player's sidebar set {_uuid} to loop-player's uuid set name of loop-player's sidebar to "&3&lServer" set score "&b----------------" in loop-player's sidebar to 8 set score "&7Name: &f%loop-player%" in loop-player's sidebar to 7 set score "&7Rank: &f%loop-player's group%" in loop-player's sidebar to 6 set score "&7Mined Blocks: &f%{playerdata::%{_uuid}%::mined} ? 0%" in loop-player's sidebar to 5 set score "&7Kills: &f%{playerdata::%{_uuid}%::kills} ? 0%" in loop-player's sidebar to 4 set score "&7Deaths: &f%{playerdata::%{_uuid}%::deaths} ? 0%" in loop-player's sidebar to 3 set score "&7Playtime: &f%{playerdata::%{_uuid}%::playtime}%" in loop-player's sidebar to 2 set score "&b----------------" in loop-player's sidebar to 1 on death of player: set {_v} to victim's uuid set {_a} to attacker's uuid add 1 to {playerdata::%{_v}%::deaths} add 1 to {playerdata::%{_a}%::kills} if {_a} is set on break: set {_uuid} to player's uuid add 1 to {playerdata::%{_uuid}%::mined} on first join: set {playerdata::%{_uuid}%::playtime} to 0 seconds every 1 minute: loop all players: add 1 minute to {playerdata::%loop-player's uuid%::playtime} Again, note that it's untested, and I expect you to read and go though this code to find how it works. Happy learning! hey can u code me a scoreboard with generator cap beside it Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now