[solved] Invalid argument and clear all potion effects

Discussion in 'Skript' started by IlLuMMiNTi, Feb 1, 2020.

Thread Status:
Not open for further replies.
  1. im working on a skript and i want to make a invalid argument code when player types wrong argument
    my current skript file
    Code (Text):

    # hi
    #

    options:
    #=options=======================================================
        Prefix: &6&l[&2&lBA&3&lTD&6&l] # BATD SERVER SKRIPT
    #===============================================================

    command /batd [<text>]:
        permission: batd.perm
        description: a skript
        trigger:
            if arg 1 is not set:
                message "{@Prefix} &2for command list type /batd yardim."
            if arg 1 is "ah":
                apply night vision 3 to the player for 300 seconds
                apply resistance 2 to the player for 300 seconds
                apply absorption 2 to the player for 300 seconds
                apply strength 5 to the player for 300 seconds
                broadcast "{@Prefix} &7 %player% used hack."
    also how can i do " clear all effects %player% " ?
     
    #1 IlLuMMiNTi, Feb 1, 2020
    Last edited: Feb 2, 2020
  2. draft code:

    Code (Text):
    command /batd [<text>]:
        permission: batd.perm
        description: a skript
        trigger:
            if arg 1 is not set:
                message "{@Prefix} &2for command list type /batd yardim."
            else if arg 1 is not ("ah", "b", "c", "d" or "e"):
                 send "invalid argument"
            else if arg 1 is "ah":
                apply night vision 3 to the player for 300 seconds
                apply resistance 2 to the player for 300 seconds
                apply absorption 2 to the player for 300 seconds
                apply strength 5 to the player for 300 seconds
                broadcast "{@Prefix} &7 %player% used hack."
     
  3. THANK YOUU
     
    • Like Like x 1
Thread Status:
Not open for further replies.