1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to use variables on wait {gg} second

Discussion in 'Skript' started by mynameisjosep, Jun 12, 2020.

Thread Status:
Not open for further replies.
  1. mynameisjosep

    mynameisjosep Member

    Joined:
    Apr 25, 2020
    Messages:
    29
    Likes Received:
    0
    hello guys i want two script
    the first script i want like this

    command /mute [<player>] [<text>] [<text>]:
    permission: mute.exe
    usage: /mute
    trigger:
    if arg-1 is set:
    if arg-2 is set:
    if arg-3 is set:
    if %arg-2% is contains "m":

    i want this but tihs is not working

    on join:
    if {muted::%player%} is set:
    wait {second::} minute

    this is black marked is too not working


     
  2. DarklordX89

    DarklordX89 Active Member

    Joined:
    Nov 2, 2019
    Messages:
    57
    Likes Received:
    0
    can you send me the full skript or is that all?
    --- Double Post Merged, Jun 12, 2020, Original Post Date: Jun 12, 2020 ---
    oh so you want a mute skript made?
     
  3. mynameisjosep

    mynameisjosep Member

    Joined:
    Apr 25, 2020
    Messages:
    29
    Likes Received:
    0
    Code (Text):
    1. command /mute [<player>] [<text>] [<text>]:
    2.     permission: sutur.exe
    3.     usage: /mute isim süre sebeb
    4.     trigger:
    5.         if arg-1 is set:
    6.             if arg-2 is set:
    7.                 if arg-3 is set:
    8.                     if %arg-2% is contains "m":
    9.                         set {muted::%arg-1%} to true
    10.                         set {second::%player%} to true
    11.                         set {second::%player%} to arg-2
    12.                         send "&7%arg-2% you muted" to arg-1
    13.                         wait %arg-2% minute
    14.                         delete {muted::%arg-1%}
    here full code
     
  4. DarklordX89

    DarklordX89 Active Member

    Joined:
    Nov 2, 2019
    Messages:
    57
    Likes Received:
    0
    for all of those {muted::%arg-1%} or all the others remove the colons and put a . so it looks like {muted.%arg-1%} and also you have to add a
    on chat:
    if {muted.%player%} is true:
    cancel event
    send "&cYou are muted" to player

    also when it says if arg-2 is contains "m": make that if arg-2 contains "m":
    also if you already have {second.%player%} set to arg-2, arg-2 contains a letter and i think that doesnt work and why set {second.%player%} to true if your setting it to arg-2
     
  5. mynameisjosep

    mynameisjosep Member

    Joined:
    Apr 25, 2020
    Messages:
    29
    Likes Received:
    0
    if i want to do wait {second::} second what i gonna do ?
     
  6. Nikd0

    Nikd0 Active Member

    Joined:
    May 30, 2020
    Messages:
    204
    Likes Received:
    19
    Use timespan variable or argument and/or parsing:
    Code (Text):
    1. /mute [<player>] [<timespan>] [<text>]:
    You need to write "3 minutes". But then you can use:
    Code (Text):
    1. set {_time} to arg-2
    2. wait {_time}
    If you want to use "m" for minutes or "s" for seconds, I can send you something more complicated into PM.
     
  7. mynameisjosep

    mynameisjosep Member

    Joined:
    Apr 25, 2020
    Messages:
    29
    Likes Received:
    0
    if i wanna do ??? its will work ????
    Code (Text):
    1. wait {_time} minute
     
  8. Nikd0

    Nikd0 Active Member

    Joined:
    May 30, 2020
    Messages:
    204
    Likes Received:
    19
    You cannot add anything after the variable, but you can do this:
    Code (Text):
    1. set {_number} to YOUR-ARGUMENT
    2. set {_time} to "%{_number}% minutes" parsed as timespan
    3. wait {_time}
    Note that the argument must only be a number (it can be text, number or integer argument but player has to put a number in it).
     
  9. mynameisjosep

    mynameisjosep Member

    Joined:
    Apr 25, 2020
    Messages:
    29
    Likes Received:
    0
    example can you do 1 minutes ?
     
  10. Nikd0

    Nikd0 Active Member

    Joined:
    May 30, 2020
    Messages:
    204
    Likes Received:
    19
    Yes, you can.
    Skript doesn't mind, it's like when you use if player have instead of if player has :emoji_grin:
     
  11. mynameisjosep

    mynameisjosep Member

    Joined:
    Apr 25, 2020
    Messages:
    29
    Likes Received:
    0
    i want you do, do this script 1 minute..
     
  12. Dave

    Dave Active Member

    Joined:
    Jul 20, 2018
    Messages:
    228
    Likes Received:
    9
    you can XD, just change <timespan> to <integer> and will work without problems

    Code (Text):
    1. wait arg-2 minutes
     
    • Useful Useful x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...