1. 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 comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Sort variables list by value

Discussion in 'Skript' started by Kamino_Ramos, May 15, 2017.

Thread Status:
Not open for further replies.
  1. Kamino_Ramos

    Kamino_Ramos Member

    Joined:
    Feb 1, 2017
    Messages:
    18
    Likes Received:
    1
    I want to create clan top based on kdr for my clan system.
    Code (Skript):
    1. on death:
    2.     add 1 to {clans::points::%{clans::players::%attacker%}%}
    3.     # this would be {clans::points::tag of attacker's clan}
    4.     remove 1 from {clans::points::%{clans::players::%victim%}%}
    5.     # this would be {clans::points::tag of victim's clan}
    And to make top I need to sort this {clans points clantag} by their value - numbers.

    For example {clans::emoji_stuck_out_tongue:oints::XYZ} has value of 10 and goes first. {clans::emoji_stuck_out_tongue:oints::ABC} has value of 5 and goes second.

    How do I do it?
     
Thread Status:
Not open for further replies.
Loading...