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.

Gui in gui..?

Discussion in 'Skript' started by Caf3, Oct 2, 2019.

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

    Caf3 Member

    Joined:
    Sep 30, 2019
    Messages:
    15
    Likes Received:
    0
    if i want to make a gui with an item that when im clicking on the item its opening another gui
    but with the player name that i wrote in command message (same argument)
    like:
    /punish <name>
    and then its open a gui and i click on mute and this is shows me mute for 1h... mute for 2h.. and this
    does it possible? and if yes how..
    THANKS!
     
  2. PuchiGFX

    PuchiGFX Member

    Joined:
    Jan 26, 2017
    Messages:
    246
    Likes Received:
    5
    There you go...
    Code (Text):
    1. command /punish [<player>]:
    2.     trigger:
    3.         open virtual chest with 4 rows named "&8Punish %arg-1%" to player
    4.         set slot 13 of player's current inventory to stone named "Clicked item"
    5.  
    6. on inventory click:
    7.     if name of player's current inventory contains "Punish":
    8.         cancel event
    9.         name of clicked item is "Clicked item"
    10.         set {_p} to subtext of name of player's current inventory from characters 10 to the length of name of player's current inventory
    11.         wait 1 tick
    12.         open virtual chest with 4 rows named "Another gui..." to player
    13.         set slot 14 of player's current inventory to stone named "%{_p}%"
    I used TuSke and Skellett for this :emoji_stuck_out_tongue:
     
  3. Vorze

    Vorze Active Member

    Joined:
    Jul 10, 2017
    Messages:
    69
    Likes Received:
    2
    You Need Tuske For This
    Code (Text):
    1. function doMute(p : player):
    2.     open virtual chest with 1 rows named "%{a2}%" to {_p}
    3.     format gui slot 0 of {_p} with barrier named "&c1 hour Mute" to run gui event
    4.     format gui slot 1 of {_p} with barrier named "&c2 hour Mute" to run gui event
    5.     format gui slot 2 of {_p} with clock named "Unmute" to run gui event
    6. on gui click:
    7.     if event-number is 0:
    8.         close player's inventory
    9.         add 60 to {mute.%{a2}%}
    10.         send "muted %{a2}% for 2 hours"
    11.         stop
    12.     if event-number is 1:
    13.         close player's inventory
    14.         send "muted %{a2}% for 2 hours"
    15.         add 120 to {mute.%{a2}%}
    16.         stop
    17.     if event-number is 2:
    18.         close player's inventory
    19.         clear {mute.%{a2}%}
    20.         send "Unmuted %{a2}%"
    21.         stop
    22. on chat:
    23.     if {mute.%{a2}%} is set:
    24.         cancel event
    25.         send "you are muted"
    26. every 1 minute:
    27.     if {mute.%{a2}%} is set:
    28.         remove 1 from {mute.%{a2}%}
    29.         if {mute.%{a2}%} is 0:
    30.             clear {mute.%{a2}%}
    31. command /punish [<player>]:
    32.     trigger:
    33.         if arg 1 is set:
    34.             open virtual chest with 1 rows named "&8Punish %arg-1%" to player
    35.             format gui slot 0 of player with barrier named "&cMute" to run function doMute(player)
    36.             set {a2} to arg 1
    37.  
     
    • Agree Agree x 1
  4. Caf3

    Caf3 Member

    Joined:
    Sep 30, 2019
    Messages:
    15
    Likes Received:
    0
    can i use tuske when skquery is on?
    --- Double Post Merged, Oct 2, 2019, Original Post Date: Oct 2, 2019 ---
    can i use tuske when skquery is on?
     
  5. Vorze

    Vorze Active Member

    Joined:
    Jul 10, 2017
    Messages:
    69
    Likes Received:
    2
    Yess
     
  6. Caf3

    Caf3 Member

    Joined:
    Sep 30, 2019
    Messages:
    15
    Likes Received:
    0
    i need help with your code.. there is a problem, (i didnt copy paste all code.. if u need all my code i will send it) upload_2019-10-2_21-13-51.png

    please help me ;-;
     
  7. Vorze

    Vorze Active Member

    Joined:
    Jul 10, 2017
    Messages:
    69
    Likes Received:
    2
    Check again,your syntax may be wrong at line 35
     
  8. PuchiGFX

    PuchiGFX Member

    Joined:
    Jan 26, 2017
    Messages:
    246
    Likes Received:
    5
    ya, send it :emoji_stuck_out_tongue:
     
  9. Caf3

    Caf3 Member

    Joined:
    Sep 30, 2019
    Messages:
    15
    Likes Received:
    0
    Code (Text):
    1. on inventory click:
    2.     if inventory name of player's current inventory is "&4» &cHelper Punish":
    3.         if clicked slot is 15:
    4.             open chest with 3 rows named "hi" to player
    this is the code, when im clicking this is not opening the new gui
     
  10. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
    Open chest is not vanilla syntax. It's skquery; open chest inventory would be the correct vanilla syntax
     
  11. Caf3

    Caf3 Member

    Joined:
    Sep 30, 2019
    Messages:
    15
    Likes Received:
    0
    i have also skquery, but its still not working
     
  12. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
  13. Caf3

    Caf3 Member

    Joined:
    Sep 30, 2019
    Messages:
    15
    Likes Received:
    0
  14. bigboybigboi

    bigboybigboi New Member

    Joined:
    Nov 26, 2019
    Messages:
    8
    Likes Received:
    0
    Aye I like this skript alot but can u make one with perm banning, temp banning ya know that good stuff
     
Thread Status:
Not open for further replies.

Share This Page

Loading...