Solved custom /help

  • 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 community!

    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.

Adrihun

Member
Feb 1, 2017
368
6
0
I was thinking about making a /help command, when you type it in, it will say all the commands.
Is there a way to make it so if you are an admin and you type in /help, it will say Admin commands, and if you are a player, it will say Player commands.

If you help i will add you to the /credits list on my server :emoji_slight_smile:
 
Here:

code_language.skript:
command /help:
    trigger:
        if player has permission "*":
            send "Admin commands..."
            send "Admin commands..."
        else:
            send "player commands..."
            send "player commands..."
 
Here:

code_language.skript:
command /help:
    trigger:
        if player has permission "*":
            send "Admin commands..."
            send "Admin commands..."
        else:
            send "player commands..."
            send "player commands..."
what if i want to add another rank?
 
You could try to make a list using {admincmds::*}, {helpercmds::*} etc. Note: I havent tested this yet.

code_language.skript:
command /addcmd <text> <text>: #/deletecmd <command> <rank>
    trigger:
        add "%arg 1%" to {%arg 2%cmds::*}
       
command /deletecmd <text> <text>: #/deletecmd <command> <rank>
    trigger:
        remove "%arg 1%" from {%arg 2%cmds::*}
       
command /help <text>: #/help [rank]
    trigger:
        if arg is set:
            send "Here is a all of the %arg 1% commands:"
            send ""
            send "%{%arg 1%cmds::*}%"
        else:
            send "Please choose a rank using /help <rank>."
 
code_language.skript:
command /help:
    trigger:
       if player has permission "help.admin":
           send "Admin commands..."
           send "Admin commands..."
       else if player has permission "help.helper":
           send "player commands..."
           send "player commands..."
       else if player has permission "help.donor":
           send "player commands..."
           send "player commands..."
       else:
           send "player commands..."
           send "player commands..."
 
Just saying that you don't have to use the send message over and over, it support multiple strings as multiple senders, you can do:
code_language.skript:
send "Some stuff", "That's" and "On multiple lines" to all players
and it'll work.
 
  • Like
Reactions: xXSwainXx
Status
Not open for further replies.