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

Leonardo_

Member
Sep 21, 2020
18
0
1
24
Hi, I would need a hand with this script:

Code:
options:
    prefix: &9&lTV &8>&7 
    line: &8&m------------------
command /tv [<string>] [<string>]:
    aliases: television
    usage: {@prefix} Syntax: /tv <create/remove/cambiadir> < channel name><direttore>
    Trigger:
        if command sender has permission "tv.create" or "tv.admin":
            if arg 1 is "create" or "create":
                if arg 2 is set:
                    set {channel.%arg 2%} to arg 2
                    message "{@prefix} &aSuccessfully created channel!"
            else:
                if arg 1 is not "remove" or "remove":
                    message "{@prefix} Syntax: /tv <create/remove> < canale name> <direttore>"
        else:
            message "{@prefix} &cYou don't have the necessary permissions."
        if command sender has permission "tv.delete" or "tv.remove" or "tv.admin":
            if arg 1 is "remove":
                if arg 2 is set:
                    if {channel.%arg 2%} is set:
                        delete {channel.%arg 2%}
                    else:
                        message "{@prefix} The Channel does not exist."
        if command sender has permission "tv.list" or "tv.admin":
            if arg 1 is "list" or "list":
                message "{@line}"
                message: <channel list>

I want to do that when a user runs the /tv list command shows the list of existing channels, but I didn't find anything that could help me and I have no idea how to do it
 
Try this.
Code:
options:
    prefix: &9&lTV &8>&7
    line: &8&m------------------
command /tv [<string>] [<string>]:
    aliases: television
    usage: {@prefix} Syntax: /tv <create/remove/cambiadir> < channel name><direttore>
    Trigger:
        if command sender has permission "tv.create" or "tv.admin":
            if arg 1 is "create" or "create":
                if arg 2 is set:
                    set {channel::%arg 2%} to arg 2
                    message "{@prefix} &aSuccessfully created channel!"
            else:
                if arg 1 is not "remove" or "remove":
                    message "{@prefix} Syntax: /tv <create/remove> < canale name> <direttore>"
        else:
            message "{@prefix} &cYou don't have the necessary permissions."
        if command sender has permission "tv.delete" or "tv.remove" or "tv.admin":
            if arg 1 is "remove":
                if arg 2 is set:
                    if {channel::%arg 2%} is set:
                        delete {channel::%arg 2%}
                    else:
                        message "{@prefix} The Channel does not exist."
        if command sender has permission "tv.list" or "tv.admin":
            if arg 1 is "list" or "list":
                message "{@line}"
                loop {channel::*}:
                    send "%loop-value%"
 
Try this.
Code:
options:
    prefix: &9&lTV &8>&7
    line: &8&m------------------
command /tv [<string>] [<string>]:
    aliases: television
    usage: {@prefix} Syntax: /tv <create/remove/cambiadir> < channel name><direttore>
    Trigger:
        if command sender has permission "tv.create" or "tv.admin":
            if arg 1 is "create" or "create":
                if arg 2 is set:
                    set {channel::%arg 2%} to arg 2
                    message "{@prefix} &aSuccessfully created channel!"
            else:
                if arg 1 is not "remove" or "remove":
                    message "{@prefix} Syntax: /tv <create/remove> < canale name> <direttore>"
        else:
            message "{@prefix} &cYou don't have the necessary permissions."
        if command sender has permission "tv.delete" or "tv.remove" or "tv.admin":
            if arg 1 is "remove":
                if arg 2 is set:
                    if {channel::%arg 2%} is set:
                        delete {channel::%arg 2%}
                    else:
                        message "{@prefix} The Channel does not exist."
        if command sender has permission "tv.list" or "tv.admin":
            if arg 1 is "list" or "list":
                message "{@line}"
                loop {channel::*}:
                    send "%loop-value%"
Thanks
 
Status
Not open for further replies.