reset player kills and deaths

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

    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!

lordmanu

Member
Apr 25, 2022
21
1
3
hi, i want reset all kills and deaths of players with skript. But i don't want use a variable skript to count a kill, I just want to reset the kills and that's it.
 
in the sense, for example if a player has 100 kills, and I founder of my server want to reset them to 0, is there a command for me to do that?
 
but where are the 100 kills stored if not in a variable, I'm so confused.
 
basically, if we used a variable to count kills and kills, i could not enter kills and kills in the scoreboard. so, to see kills and kills in the scoreboard i use a placeholder api from essentials, and also another plugin. so, since there might be an eventuality of resetting the kills to the players when i open the server, i was wondering if there was some command that would reset the kill counter of essentials. or, if with a skript, you could reset the kill counter of essentials. so don't create a counter with skript, but reset the one of essentials.
 
Here:
Code:
on join:
    if {players::*} does not contain player's uuid:
        add player's uuid to {players::*}
        
on death:
    add 1 to {kills::%attacker's uuid%}
    add 1 to {deaths::%victim's uuid%}
    
command resetstats:
    trigger:
        loop {players::*}:
            delete {kills::%loop-value%}
            delete {deaths::%loop-value}
 
thx, but i have this error: "The percent sign is used for expressions (e.g. %player%). To insert a '%' type it twice: %%. (luckyb.sk, line 452: delete {deaths::%loop-value}')" i have minecraft 1.8.9