Setting a count

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

JackyBoy

Member
Feb 4, 2017
104
1
18
21
Hey, so I was wondering if there was a way to make it so when a player (who has perms) runs a command say /countlist playername topic they can see how many points they have in that area and then another command can do /countset playername topic points to add points to the player in the topic. But also have several topics and allow people to have different points per topic. Thank, any help would be great!
 
for your counset command, have it add the points to a list variable. {points::%arg 2%::%arg 3%} for instance.
code_language.skript:
command /countset <offline player> <text> <number>:
Where arg 1 is the player to set, arg 2 is the topic and arg 3 is the number of points.
You can then call it to list with similar arguments and that same variable. Just plug in what you need to the command to reference the variable
 
for your counset command, have it add the points to a list variable. {points::%arg 2%::%arg 3%} for instance.
code_language.skript:
command /countset <offline player> <text> <number>:
Where arg 1 is the player to set, arg 2 is the topic and arg 3 is the number of points.
You can then call it to list with similar arguments and that same variable. Just plug in what you need to the command to reference the variable
Thanks but how would I keep each players points recorded?
 
you can add them to the variable or set the variable. I prefer to set it, myself. Also I realized I mixed up the numbers, but you get the idea, the argument corresponds to the arguments in the command
code_language.skript:
set {points::%arg 1%::%arg 2%} to {points::%arg 1%::%arg 2%} + %arg 3%
 
you can add them to the variable or set the variable. I prefer to set it, myself. Also I realized I mixed up the numbers, but you get the idea, the argument corresponds to the arguments in the command
code_language.skript:
set {points::%arg 1%::%arg 2%} to {points::%arg 1%::%arg 2%} + %arg 3%
Alright, thanks. But I don't understand sorry
 
You may want to read the variables page in the documentation to brush up on them.
Which part are you having trouble with understanding? I can try and be more clear.
 
You may want to read the variables page in the documentation to brush up on them.
Which part are you having trouble with understanding? I can try and be more clear.
Thanks for your help and I'm sure it's fine but I just don't really know Skripts all that well
 
Status
Not open for further replies.