Hi, I would need a hand with this script:
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
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