Code for rank

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

Colin

Member
May 19, 2020
3
0
1
24
Is there a way using skript to enter a command and then it will ask you for a code and if you enter the correct code it runs a command to give a certain rank? I'm new to this so sorry if this is not possible.
 
yes, there is defiantly a way to do that, it would look something like this
Code:
command /YOURCOMMANDNAME:
  trigger:
    send "&eEnter the Secret Code to Continue"
    send "&e You have 10 seconds"
    set {Timer.%player%} to 1
    wait 10 second
    set {Timer.%player%} to 0
   

on chat:
  if message is "ENTER CODE HERE":
    {Timer.%player%} is 1
    #Do Something here

I Hope this helps
 
yes, there is defiantly a way to do that, it would look something like this
Code:
command /YOURCOMMANDNAME:
  trigger:
    send "&eEnter the Secret Code to Continue"
    send "&e You have 10 seconds"
    set {Timer.%player%} to 1
    wait 10 second
    set {Timer.%player%} to 0
 

on chat:
  if message is "ENTER CODE HERE":
    {Timer.%player%} is 1
    #Do Something here

I Hope this helps
Thanks so much
[doublepost=1600973075,1600970365][/doublepost]This is great but when you put the code in the chat anyone could see it is there a way so it does not send the chat publicly
 
Last edited:
Oh, yes very easily, just add a cancel event after the on "if message" arg. this code should do the trick

Code:
command /YOURCOMMANDNAME:
  trigger:
    send "&eEnter the Secret Code to Continue"
    send "&e You have 10 seconds"
    set {Timer.%player%} to 1
    wait 10 second
    set {Timer.%player%} to 0
 
 
on chat:
  if message is "ENTER CODE HERE":
    cancel event   
    {Timer.%player%} is 1
    #Do Something here
 
Status
Not open for further replies.