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.

How to add something to a list

Discussion in 'Skript' started by Jimsk, Mar 16, 2020.

Tags:
Thread Status:
Not open for further replies.
  1. Jimsk

    Jimsk Member

    Joined:
    Mar 13, 2020
    Messages:
    21
    Likes Received:
    1
    I am trying to make a /request, where players can request music or ideas to add to the server! I have tried to do this but im quite a beginner to skript ;p, can someone help me out? (p.s, i also want to make it so if the idea is already there, it says a message)

    command /request [<text>]:
    cooldown: 1 minute
    cooldown message: "&4You have to wait to use this!"
    trigger:
    if %arg1% is in {requests}
    send "This song has already been requested" to player
    else:
    add %arg1% to {requests}
     
  2. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    https://forums.skunity.com/threads/general-skript-tutorial.5174/

    and open Spoiler: variable explanation
     
  3. sluhtie

    Supporter

    Joined:
    Feb 8, 2020
    Messages:
    24
    Likes Received:
    1
    Code (Skript):
    1. command /request [<text>]:
    2.     cooldown: 1 minute
    3.     cooldown message: "&4You have to wait to use this!"
    4.     trigger:
    5.         if {requests::*} contains arg-1
    6.             send "This song has already been requested" to player
    7.         else:
    8.             add arg-1 to {requests::*}
     
    • Useful Useful x 1
  4. Jimsk

    Jimsk Member

    Joined:
    Mar 13, 2020
    Messages:
    21
    Likes Received:
    1
    Thank you, it worked well!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...