1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setting a count

Discussion in 'Skript' started by JackyBoy, Feb 20, 2018.

Thread Status:
Not open for further replies.
  1. J

    JackyBoy Member

    Joined:
    Feb 4, 2017
    Messages:
    102
    Likes Received:
    1
    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!
     
  2. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    974
    Likes Received:
    57
    for your counset command, have it add the points to a list variable. {points::%arg 2%::%arg 3%} for instance.
    Code (Skript):
    1. 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
     
  3. J

    JackyBoy Member

    Joined:
    Feb 4, 2017
    Messages:
    102
    Likes Received:
    1
    Thanks but how would I keep each players points recorded?
     
  4. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    974
    Likes Received:
    57
    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 (Skript):
    1. set {points::%arg 1%::%arg 2%} to {points::%arg 1%::%arg 2%} + %arg 3%
     
  5. J

    JackyBoy Member

    Joined:
    Feb 4, 2017
    Messages:
    102
    Likes Received:
    1
    Alright, thanks. But I don't understand sorry
     
  6. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    974
    Likes Received:
    57
    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.
     
  7. J

    JackyBoy Member

    Joined:
    Feb 4, 2017
    Messages:
    102
    Likes Received:
    1
    Thanks for your help and I'm sure it's fine but I just don't really know Skripts all that well
     
Thread Status:
Not open for further replies.
Loading...