Solved arguments (read post before reply)

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

Diamond_C

Member
Mar 10, 2020
1
0
0
23
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)
 
Code:
command ban <player> <text> <text>:
    permission: staff.ban
    trigger:
        if arg-2 is "-s":
            ban arg-player because arg-3
            send "&7You banned &3%arg-player% &7for &c%arg-3% &7[FOREVER]"
        else:
            ban arg-player because arg-3
            send "&3%player% &7banned &3%arg-player% &7for &c%arg-3% &7[FOREVER]"
 
  • Like
Reactions: Diamond_C
Status
Not open for further replies.