TOP PLAYER

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Uzumaki

Well-Known Member
Feb 20, 2017
310
10
18
33
Hey guys i want to show the player with more kills example "Uzumaki Won With 6 Kills"




My Fails

code_language.skript:
sub "winner":  
    set {_1st.point} to 0
    loop {Won::gamekills::*}:
        set {_1st} to loop-index
        set {_1st.point} to loop-value
        wait 2 seconds
        broadcast "&7➤ &e●&l&o &c%{_1st}% &7&lwon with &c&l%{_1st.point}% &cKills &e●&l&o"
        loop all players:
            send loop-player title "&e✦ &c%{_1st}% &7Won &e✦" for 2 seconds       
on death of player:
    add 1 to {Won::gamekills::%attacker%}
 
Try:
code_language.skript:
sub "winner":
    set {_1st.point} to 0
    loop {Won::gamekills::*}:
        If loop-value > {_1st.point}:
            set {_1st} to loop-index
            set {_1st.point} to loop-value
    Broadcast "%{_1st}% has the most kills"
 
code_language.skript:
# 0:int=0 - function nuller.

function winner(0:int=0):
    loop {game::kills::*}:
        set {_kills::%loop-index%} to "%loop-value%;%loop-index%"
        set {_} to 1
        loop {_kills::*}:
            set {_player::*} to split "%{_kills::%loop-index-2%}%" by ";"
            {_player::2} != "<none>":
                {_player::1} != "<none>":
                    {_} <= 3:
                        broadcast "##%{_}% %{_player::2}% won with %{_player::1}% kills."
                        add 1 to {_}

function delwin(0:int=0):
    delete {game::kills::*}

on death:
    add 1 to {game::kills::%player%}
idk how to fix it:
91WqdQI.png

[doublepost=1501058197,1501057730][/doublepost]try this
 
Or just use what i sended :emoji_stuck_out_tongue:
Thanks
[doublepost=1501060296,1501060264][/doublepost]
code_language.skript:
# 0:int=0 - function nuller.

function winner(0:int=0):
    loop {game::kills::*}:
        set {_kills::%loop-index%} to "%loop-value%;%loop-index%"
        set {_} to 1
        loop {_kills::*}:
            set {_player::*} to split "%{_kills::%loop-index-2%}%" by ";"
            {_player::2} != "<none>":
                {_player::1} != "<none>":
                    {_} <= 3:
                        broadcast "##%{_}% %{_player::2}% won with %{_player::1}% kills."
                        add 1 to {_}

function delwin(0:int=0):
    delete {game::kills::*}

on death:
    add 1 to {game::kills::%player%}
idk how to fix it:
91WqdQI.png

[doublepost=1501058197,1501057730][/doublepost]try this
Thanks
 
Status
Not open for further replies.