Hey, so for my SoupPvP server I made the "currency" called KillPoints, when you kill a player you get one and when you die you lose one.
Basically I'm trying to make a command to reset the server's killpoints for when I do stat resets, and I cant figure out how to get all players who have ever joined in a variable. This is what I have so far:
Basically for the on chat: thing, I'm trying to make it so that when you type "yes" it sets the killpoints of all players who ever joined to 0. Whenever I run the command and type "yes," it doesnt reset anyone's killpoints. Ive tried many things like {total-killpoints.%uuid of all offline players%}, none of it seems to work. Please help.
Basically I'm trying to make a command to reset the server's killpoints for when I do stat resets, and I cant figure out how to get all players who have ever joined in a variable. This is what I have so far:
Code:
command /resetserverkillpoints [<text>]:
aliases: rskp
trigger:
if executor does not have permission "yochranstaffcore.management":
message "&fUnknown command. Type '/help' for help."
else:
message "&aAre you sure you want to do this?"
message "&aType &2Yes &aor &cNo &ain chat to confirm."
set {rskp.%uuid of player%} to true
on chat:
if {rskp.%uuid of player%} is true:
if "%message%" contains "No":
cancel event
message "&aYou cancelled resetting the server's killpoints."
delete {rskp.%uuid of player%}
else:
if "%message%" contains "Yes":
cancel event
message "&aYou have reset the server's killpoints."
loop all players:
set {total-killpoints::*} to 0
delete {rskp.%uuid of loop-player-1%}
Basically for the on chat: thing, I'm trying to make it so that when you type "yes" it sets the killpoints of all players who ever joined to 0. Whenever I run the command and type "yes," it doesnt reset anyone's killpoints. Ive tried many things like {total-killpoints.%uuid of all offline players%}, none of it seems to work. Please help.
Last edited: