How to add something to a list

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

Jimsk

Member
Mar 13, 2020
21
1
3
23
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}
 
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}

https://forums.skunity.com/threads/general-skript-tutorial.5174/

and open Spoiler: variable explanation
 
code_language.skript:
command /request [<text>]:
    cooldown: 1 minute
    cooldown message: "&4You have to wait to use this!"
    trigger:
        if {requests::*} contains arg-1
            send "This song has already been requested" to player
        else:
            add arg-1 to {requests::*}
 
Status
Not open for further replies.