#How to split variables, such as my %die_test% variable can identify the player and a value, how to s
1 messages · Page 1 of 1 (latest)
%ldp_die2% This variable can resolve the player and a number of deaths
@frank jasper I want to split it into two variables
Identify the name and value of this variable individually
thats not a variable
papi variable
Because I don't know how to make the sk variable so that it can record the player's name and the number of deaths when the player dies
if attacker is not a player:
if "%region at victim%" contains "tcsldp":
add 1 to {deaths::%victim%}
loop all players:
"%region at loop-player%" contains "tcsldp"
Send title "&cThis time it's &a&l%victim%&c died" with subtitle "&cYou're lucky lol!" to loop-player for 60 tick with fadein 20 tick and fade out 20 tick```
this is my variable
He can only get the number of deaths of the player
you already know the player tho
I want to add the player name of the person who let him get the death
do you want to make a command to show the deaths?
ohhh
just use attacker then
to get the killer
if that's what you mean
Can't add a player name information directly to the variable?
Because not all variables have such incidents as attackers
what use would this have for you?
you want to add the killer to a variable for each death?
I want to make a leaderboard and need to separate the name and value
But now I only get the value without the player name
you want a leaderboard for deaths?
I can't tell in the leaderboard which player has that many numbers
Just for example, I want to get the player name of the variable value
loop sorted indieces of {deaths::*} in descending order:
# loop-value = name of player
# {deaths::%loop-value%} = the amount of deaths
I just want to get the name, will it be hard
if you want for example a top 10, you just do
loop sorted indieces of {deaths::*} in descending order:
add 1 to {_}
send "%loop-value% has died %{deaths::%loop-value%}% times."
exit if {_} = 10
that'd be a top 10 for deaths
If identifier is "ldp_die":
Set result to "%{deaths::%player%}% %player%"```If you write like this, you can get the player name, but I can't split it
you dont need placeholders
Mainly what I need now is not this
I have a plug-in that can identify the top ten of the leaderboard
But I mainly want to split this player name, or the player name that can read this variable
you're overcomplicating things
seems to be true
loop sorted indieces of {deaths::*} in descending order:
# loop-value = name of player
# {deaths::%loop-value%} = the amount of deaths
I don't know how to apply this to
in my game
oops
i gave you a full example