Jump to content

Ranking system


Recommended Posts

Hello so I want to make a like "tier system". So basically I want it so when the player gets a kill 1 they get 1 point. When a player gets 5 points they get upgraded to the next rank, (the rank should be a luckperms suffix). 

If i explained this unclearly please tell me and I'll explain this better. 

Edited by hamiloza
Link to comment
Share on other sites

  • 2 weeks later...

Moved to Skript. Please use the proper categories.

rose city STICKER

RosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaR

i code, animate, develop, UI design, learn, and adapt, as well as make servers, of course

💐Joined Minehut sometime in 2014
💐VIP sometime in 2018
💐Legend in January 2021
💐Helper on 4/11/2021
💐♥ (Retired) on 5/17/2021
💐 Moderator on 8/18/2023

Link to comment
Share on other sites

I recommend you make a group for each time the player should rank up and then set the suffix for each group:

/lp group add 5kills (or whatever the command is) and then /lp group suffix 10kills &8[&c1&8]&r (or whatever the command is)
/lp group add 10kills (or whatever the command is) and then /lp group suffix 10kills &8[&c1&8]&r (or whatever the command is)
/lp group add 20kills (or whatever the command is) and then /lp group suffix 20kills &8[&c1&8]&r (or whatever the command is)

and when the player gets a kill they get added to the group via commands, you can probably also do it with the placeholders for each luckperms group. But i don't have time and i don't feel like going through that hell. It would only be slightly if better and if not it would just be the same.

To add more point groups just copy and paste a section of the function and then change the names and number accordingly.

Code:

on death:
    if victim is player:
        if attacker is player:
            add 1 to {rank.points::%uuid of player%}
            rankUp(player)
            
function rankUp(p: player)
    if {rank.points::%uuid of {_p}%} = 5:
        execute console command "/lp user %{_p}% group add 5points"
    if {rank.points::%uuid of {_p}%} = 10:
        execute console command "/lp user %{_p}% group remove 5points"
        execute console command "/lp user %{_p}% group remove 10points"
    if {rank.points::%uuid of {_p}%} = 20:
        execute console command "/lp user %{_p}% group remove 10points"
        execute console command "/lp user %{_p}% group remove 20points"

 

                                                                        Skærmbillede 2024-02-11 151140.png

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...