Büyükten kücüğe liste sıralaması

AhmHkn1553

Zombi Katili
En iyi cevaplar
0
Merhaba. Acaba şöyle bir şey var mı? Benim bir listem var ve her adam 1 oyuncu öldürünce +1 ekleniyor. Ben top10 yapmayı düşünüyorum. Peki bu listeyi büyükten kücüğe sıralama yapabilirmiyiz ?
Yani adam /top10 yazıcak ve ona
send "1. %{oldurme::%player%}%"
Böyle olucak ama bu 1. sırada en çok adam öldüren olucak, onun altında 2. olucak.
 

Goktug_OA

Ağaç Yumruklayıcı
En iyi cevaplar
0
Kod:
command /top5:
    trigger:
        set {_1st.point} to 0
        set {_2nd.point} to 0
        set {_3rd.point} to 0
        set {_4th.point} to 0
        set {_5th.point} to 0
        loop {oldurme:::*}:
            if loop-value is more than {_1st.point}:
                set {_5th} to {_4th}
                set {_5th.point} to {_4th.point}
                set {_4th} to {_3rd}
                set {_4th.point} to {_3rd.point}
                set {_3rd} to {_2nd}
                set {_3rd.point} to {_2nd.point}
                set {_2nd} to {_1st}
                set {_2nd.point} to {_1st.point}
                set {_1st} to loop-index
                set {_1st.point} to loop-value
            else if loop-value is more than {_2nd.point}:
                set {_5th} to {_4th}
                set {_5th.point} to {_4th.point}
                set {_4th} to {_3rd}
                set {_4th.point} to {_3rd.point}
                set {_3rd} to {_2nd}
                set {_3rd.point} to {_2nd.point}
                set {_2nd} to loop-index
                set {_2nd.point} to loop-value
            else if loop-value is more than {_3rd.point}:
                set {_5th} to {_4th}
                set {_5th.point} to {_4th.point}
                set {_4th} to {_3rd}
                set {_4th.point} to {_3rd.point}
                set {_3rd} to loop-index
                set {_3rd.point} to loop-value
            else if loop-value is more than {_4th.point}:
                set {_5th} to {_4th}
                set {_5th.point} to {_4th.point}
                set {_4th} to loop-index
                set {_4th.point} to loop-value
            else if loop-value is more than {_5th.point}:
                set {_5th} to loop-index
                set {_5th.point} to loop-value
        send "&b===================================="
        send "&6             [Top Öldürmeler]"
        send "&b===================================="
        send "&a1. Oyuncu: &f%{_1st}% &2- &f%{_1st.point}%"
        send "&62. Oyuncu: &b%{_2nd}% &2- &b%{_2nd.point}%"
        send "&c3. Oyuncu: &f%{_3rd}% &2- &f%{_3rd.point}%"
        send "&44. Oyuncu: &b%{_4th}% &2- &b%{_4th.point}%"
        send "&55. Oyuncu: &f%{_5th}% &2- &f%{_5th.point}%"
        send "&b===================================="

Top 5 Oldu bunu daha uzatabilirsin iyi oyunlar
 

AhmHkn1553

Zombi Katili
En iyi cevaplar
0
Kod:
command /top5:
    trigger:
        set {_1st.point} to 0
        set {_2nd.point} to 0
        set {_3rd.point} to 0
        set {_4th.point} to 0
        set {_5th.point} to 0
        loop {oldurme:::*}:
            if loop-value is more than {_1st.point}:
                set {_5th} to {_4th}
                set {_5th.point} to {_4th.point}
                set {_4th} to {_3rd}
                set {_4th.point} to {_3rd.point}
                set {_3rd} to {_2nd}
                set {_3rd.point} to {_2nd.point}
                set {_2nd} to {_1st}
                set {_2nd.point} to {_1st.point}
                set {_1st} to loop-index
                set {_1st.point} to loop-value
            else if loop-value is more than {_2nd.point}:
                set {_5th} to {_4th}
                set {_5th.point} to {_4th.point}
                set {_4th} to {_3rd}
                set {_4th.point} to {_3rd.point}
                set {_3rd} to {_2nd}
                set {_3rd.point} to {_2nd.point}
                set {_2nd} to loop-index
                set {_2nd.point} to loop-value
            else if loop-value is more than {_3rd.point}:
                set {_5th} to {_4th}
                set {_5th.point} to {_4th.point}
                set {_4th} to {_3rd}
                set {_4th.point} to {_3rd.point}
                set {_3rd} to loop-index
                set {_3rd.point} to loop-value
            else if loop-value is more than {_4th.point}:
                set {_5th} to {_4th}
                set {_5th.point} to {_4th.point}
                set {_4th} to loop-index
                set {_4th.point} to loop-value
            else if loop-value is more than {_5th.point}:
                set {_5th} to loop-index
                set {_5th.point} to loop-value
        send "&b===================================="
        send "&6             [Top Öldürmeler]"
        send "&b===================================="
        send "&a1. Oyuncu: &f%{_1st}% &2- &f%{_1st.point}%"
        send "&62. Oyuncu: &b%{_2nd}% &2- &b%{_2nd.point}%"
        send "&c3. Oyuncu: &f%{_3rd}% &2- &f%{_3rd.point}%"
        send "&44. Oyuncu: &b%{_4th}% &2- &b%{_4th.point}%"
        send "&55. Oyuncu: &f%{_5th}% &2- &f%{_5th.point}%"
        send "&b===================================="

Top 5 Oldu bunu daha uzatabilirsin iyi oyunlar
Çok teşekkür ederim.
 
Üst