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.

Remove every command except one

Discussion in 'Skript' started by bebeli555, Apr 28, 2020.

Thread Status:
Not open for further replies.
  1. bebeli555

    bebeli555 Member

    Joined:
    Feb 6, 2020
    Messages:
    28
    Likes Received:
    0
    So anyone know how to make like a skript that remove every command from the game except one like this but this doesnt work:


    Code (Text):
    1. on command:
    2.     if command equals "/help":
    3.         #Do stuff
    4.     else:
    5.         cancel event
    6.         send "You can only use /help command!"
     
  2. You should definetly be careful of skripts like that, if you mess something up, removing / reloading anything will be really difficult, as that code would also be blocking console commands.

    But this is what I came up with
    Code (Text):
    1. on command:
    2.     if command sender is a player:
    3.         if command contains "help":
    4.             send "it worked"
    5.         else:
    6.             cancel event
    7.             send "You can only use /help command!"
     
  3. bebeli555

    bebeli555 Member

    Joined:
    Feb 6, 2020
    Messages:
    28
    Likes Received:
    0
    That works thanks
     
Thread Status:
Not open for further replies.

Share This Page

Loading...