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

SNEAKING ON A BLOCK NEED HELP

Discussion in 'Skript' started by AlfaLe0, Mar 7, 2018.

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

    AlfaLe0 Active Member

    Joined:
    Mar 2, 2018
    Messages:
    25
    Likes Received:
    0
    I need some help... I want to make that if a player is sneaking on a white wool block appen something... like send title message... change variables

    Player is sneaking
    On a wool block
    Every 3 second
    Send message 3
    Send message 2
    Send message 1
    Add 1 to variable money
    #Repeat it every 3 seconds if the player is sneaking on the wool block

    HELP ME PLEASE
    --- Double Post Merged, Mar 7, 2018, Original Post Date: Mar 7, 2018 ---
    Please it is urgent
     
  2. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    175
    Medals:
    wait 24 hours before bumping, people have lives
    Code (Skript):
    1. on join:
    2.     while player is online:
    3.         if block below player is wool:
    4.             if player is sneaking:
     
    • Agree Agree x 1
  3. AlfaLe0

    AlfaLe0 Active Member

    Joined:
    Mar 2, 2018
    Messages:
    25
    Likes Received:
    0
    Thanks but I don’t want only when the player join... every time if player is on a wool block create a loop command... when the player is not sneaking or is not on the wool block the loop stop... please can you do this?
     
  4. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    This is what you want, because when a player joins the code gets looped until the player disconnects
    Code (Skript):
    1. on join:
    2.     while player is online:
    3.         block below player is wool
    4.         player is sneaking
    5.         # code here
    but if you only want it to happen once, this will work:
    Code (Skript):
    1. on step on wool:
    2.     player is sneaking
    3.     # code here
     
    • Like Like x 1
  5. AlfaLe0

    AlfaLe0 Active Member

    Joined:
    Mar 2, 2018
    Messages:
    25
    Likes Received:
    0
    Thanks but if I want a code like that when the player is on the wool and sneaking:
    Message “3”
    Wait 1 second
    Message “2”
    Wait 1 second
    Message “1”
    Wait 1 second
    Message “process ended”
    Add 1 to a variable

    AND REPEAT THE PROCESS UNTIL THE PLAYER IS NOT SNEAKING ON WOOL...
    How I can loop this? And when the player is not sneaking on wool the process instantly STOP

    Thanks
     
Thread Status:
Not open for further replies.
Loading...