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

Solved different variables in list

Discussion in 'Skript' started by Kolsenstein, Jul 17, 2021.

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

    Kolsenstein Member

    Joined:
    Jul 1, 2021
    Messages:
    4
    Likes Received:
    0
    I want to add player name and random number to a list, but idk how to add more then one variable into a list at a time. I want it to look like this when you use /contacts:
     

    Attached Files:

  2. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    try this
    Code (Text):
    1. command /addcontact [<player>]:
    2.   trigger:
    3.     add 1 to {contacts::num::%player's uuid%}
    4.     set {contacts::contact::%player's uuid%::uuid::%{contacts::num::%player's uuid%}%} to uuid of arg-1
    5.     set {contacts::contant::%player's uuid%::number::%{contacts::num::%player's uuid%}%} to YOUR NUMBER THING HERE
    6.  
    7. on join:
    8.   set {contacts::lastname::%uuid of player%} to "%player%"
    9.  
    10. command /contacts:
    11.   trigger:
    12.     send "Your contacts:"
    13.     set {_num} to 0
    14.     loop {contacts::contant::%player's uuid%::*}:
    15.       add 1 to {_num}
    16.       send "%{contacts::lastname::%{contacts::contact::%player's uuid%::uuid::%{_num}%}%}% - %{contacts::contact::%player's uuid%::number::%{_num}%}%"
    17.     send "You have a total of %{contacts::num::%player's uuid%}% contacts."
    And BTW. this is the wrong section. With this system the numbers are not consistent, if you want a whole phone number system go to script requests.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...