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

I'm trying to make a silent ban would this work?

Discussion in 'Skript' started by H3A, Sep 11, 2019 at 7:11 PM.

  1. H

    H3A Member

    Joined:
    Aug 19, 2019
    Messages:
    12
    Likes Received:
    1
    Code (Text):
    1. command /ban <player = %offlineplayer%> [<text>]:
    2.     trigger:
    3.         if arg-1 is not set:
    4.             send "&cPlease provide a user to ban."
    5.         if arg-1 is set:
    6.             if arg-2 contains "-s":
    7.                 replace all "-s" with "" in arg-2
    8.                 ban player due to arg-2
    9.                 send "&e%arg-1% &chas been banned due to &a%arg-2% &7(Silent)" to all player where input is [permission.sk]
    10.         else:
    11.        
     
  2. n

    notblueblob67 Member

    Joined:
    Friday
    Messages:
    5
    Likes Received:
    0
    I think it should work I'm testing it now
    --- Double Post Merged, Sep 14, 2019 at 10:24 AM, Original Post Date: Sep 14, 2019 at 10:22 AM ---
    Just tested it. It said it cannot understand the expression %offlineplayer%

    I'm new to skript so I can't really help fix it. Sorry
     
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,007
    Likes Received:
    138
    I recommend reading thru the tutorial on creating commands
    https://skripthub.net/tutorials/10

    this:
    "command /ban <player = %offlineplayer%> " <-- the offline player part you are using there is a default. Mean if you dont enter a player it would default to this value, but why the heck would you want to default to yourself?
    You aren't going to ban yourself are you?!?!
     
Loading...