On command link with another command

  • 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.
Oct 3, 2017
19
2
3
26
Skript Version: Latest
Minecraft Version: 1.8.x

I'm using the litebans plugin and trying to figure out a way I can link /warn to automatically do /kick with the same messages. I haven't really done anything with arguments so I'm not really sure how this would work. I had something like this but it does not do the second command.

  1. on command "/warn <text> <text>":
  2. if player has permission "litebans.warn":
  3. execute console command "/kick arg-0 arg-1"
  4. else:
  5. message "&cYou cannot execute that command."
 
When arguments are in text, you need to put % % around them. Example is %arg-1%.
 
on command "/warn <text> <text>":
if player has permission "litebans.warn":
execute console command "/kick %arg-0% %arg-1%"
else:
message "&cYou cannot execute that command"

Error:
This command doesn't have any arguments (warnkick.sk, line 3: execute console command "/kick %arg-0% %arg-1%"')
 
Remove the quotes on the first line. And when you start arguments, it starts by 1, not 0.
 
The string in the event is just for the main command (warn), nothing else
 
Status
Not open for further replies.