The command doesn't have a 2nd argument (join.sk, line 18: if arg 2 is mute"

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

PabloGamerYTB

Member
Jul 10, 2018
1
0
0
code_language.skript:
on join:
    set join message to "§9[+] §7%player% vient de rejoindre le serveur"
on quit:
    set quit message to "§ง9[-] §7%player% vient de quitter le serveur"

command /chat [<text>]:
    permission: admin.use
    aliases: c, tchat
    trigger:
        if player doesn't have permission "clear.admin":
            send "&c&lVous n'avez pas les droits pour éxécuter cette commande"
            stop trigger
        if arg 1 is "clear":
            loop 200 times:
                broadcast ""
            broadcast "&6Le chat à été clear par %player% !"
        if arg 1 is "mute":
            if arg 2 is "mute":
                set {muteall.on} to true
                broadcast "§aLe chat a été mute par %player%"
        if arg 1 is "mute":
            if arg 2 is "on":
                set {muteall.off} to true
                broadcast "§aLe chat a été démute par %player%"
        if arg 1 is not "mute" or "clear":
            message "&cUsage: /chat <clear:mute>" to player
             
on chat:
    if {muteall.on} is true:
        cancel event
        send "&cVous ne pouvez pas parler quand le chat est mute."
         
on command:
    command is "pl" or "plugin" or "plugins" or "?" or "about" or "bukkit:plugins" or "bukkit:pl" or "bukkit:about" or "bukkit:?":
        if player is op:
            stop
        else:
            cancel event
            send "&c&lVous n'avez pas les droits pour éxécuter cette commande"
 
Last edited by a moderator:
on join:
set join message to "§9[+] §7%player% vient de rejoindre le serveur"
on quit:
set quit message to "§ง9[-] §7%player% vient de quitter le serveur"

command /chat [<text>]:
permission: admin.use
aliases: c, tchat
trigger:
if player doesn't have permission "clear.admin":
send "&c&lVous n'avez pas les droits pour éxécuter cette commande"
stop trigger
if arg 1 is "clear":
loop 200 times:
broadcast ""
broadcast "&6Le chat à été clear par %player% !"
if arg 1 is "mute":
if arg 2 is "mute":
set {muteall.on} to true
broadcast "§aLe chat a été mute par %player%"
if arg 1 is "mute":
if arg 2 is "on":
set {muteall.off} to true
broadcast "§aLe chat a été démute par %player%"
if arg 1 is not "mute" or "clear":
message "&cUsage: /chat <clear:mute>" to player

on chat:
if {muteall.on} is true:
cancel event
send "&cVous ne pouvez pas parler quand le chat est mute."

on command:
command is "pl" or "plugin" or "plugins" or "?" or "about" or "bukkit:emoji_stuck_out_tongue:lugins" or "bukkit:emoji_stuck_out_tongue:l" or "bukkit:about" or "bukkit:?":
if player is op:
stop
else:
cancel event
send "&c&lVous n'avez pas les droits pour éxécuter cette commande"
You have to define a second argument in your chat command
 
Try this:
code_language.skript:
command /chat [<text>] [<text>]:
    permission: admin.use
    aliases: c, tchat
    trigger:

Remember that "/chat" is not considered an argument, so the first [<text>] is the arg 1
 
Status
Not open for further replies.