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.

Solved arguments (read post before reply)

Discussion in 'Skript' started by Diamond_C, Mar 10, 2020.

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

    Diamond_C Member

    Joined:
    Mar 10, 2020
    Messages:
    1
    Likes Received:
    0
    So, I'm making a server, and currently making a punishment system.
    I Want to have silent and public punishments, and to do that i want to do a command:

    Silent: /ban Diamond_C -s cheating
    Public: /ban Diamond_C cheating

    How do i check for a "-s" after the name and before the reason?

    (latest skript version and on 1.15.2)
     
  2. Best Answer:
    Post #2 by Goose, Mar 11, 2020
  3. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    429
    Likes Received:
    30
    Code (Text):
    1. command ban <player> <text> <text>:
    2.     permission: staff.ban
    3.     trigger:
    4.         if arg-2 is "-s":
    5.             ban arg-player because arg-3
    6.             send "&7You banned &3%arg-player% &7for &c%arg-3% &7[FOREVER]"
    7.         else:
    8.             ban arg-player because arg-3
    9.             send "&3%player% &7banned &3%arg-player% &7for &c%arg-3% &7[FOREVER]"
     
    • Like Like x 1
  4. SpawnRusher

    Supporter

    Joined:
    Jan 9, 2020
    Messages:
    8
    Likes Received:
    0
    As the mighty ShaneBee once said,
    "no, 'latest' is not a version"
     
    • Funny Funny x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...