How to make it that player can only use a certain 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.

WhiteWolf

Member
May 2, 2020
32
2
8
he/him
Hello there!
I've been skripting Bedwars on my server, and I got stumped at, "How do you make it so that the player can only use a certain command?"
I've tried multiple things and nothing worked. Here is something I tried:
Code:
on command:
   if event-command is "/bedwars join Medieval":
      if {inqueue.%player%} is true:
         message "You cannot use commands right now."
If anyone could help me, that would be greatly appreciated.

Thanks,
WhiteWolf
 
You can use this:
Code:
on command "/bedwars join Medieval":
    if player != "Player" or "Player2":
        message "You cannot use commands right now."

If you want it as a variable, make sure it sets the variable {inqueue.%player%} to true.
 
Hello there!
I've been skripting Bedwars on my server, and I got stumped at, "How do you make it so that the player can only use a certain command?"
I've tried multiple things and nothing worked. Here is something I tried:
Code:
on command:
   if event-command is "/bedwars join Medieval":
      if {inqueue.%player%} is true:
         message "You cannot use commands right now."
If anyone could help me, that would be greatly appreciated.

Thanks,
WhiteWolf
Or do something like this:
code_language.skript:
on command:
    command sender is a player:
       if {inqueue.%player%} is true:
            command is not "/cmd that you dont want execute":
               message "&cYou cannot use commands right now." to player
               cancel event
 
Or do something like this:
code_language.skript:
on command:
    command sender is a player:
       if {inqueue.%player%} is true:
            command is not "/cmd that you dont want execute":
               message "&cYou cannot use commands right now." to player
               cancel event
Thanks!
 
Status
Not open for further replies.