Gui in gui..?

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

Caf3

Member
Sep 30, 2019
15
0
0
19
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!
 
There you go...
Code:
command /punish [<player>]:
    trigger:
        open virtual chest with 4 rows named "&8Punish %arg-1%" to player
        set slot 13 of player's current inventory to stone named "Clicked item"

on inventory click:
    if name of player's current inventory contains "Punish":
        cancel event
        name of clicked item is "Clicked item"
        set {_p} to subtext of name of player's current inventory from characters 10 to the length of name of player's current inventory
        wait 1 tick
        open virtual chest with 4 rows named "Another gui..." to player
        set slot 14 of player's current inventory to stone named "%{_p}%"

I used TuSke and Skellett for this :emoji_stuck_out_tongue:
 
You Need Tuske For This
Code:
function doMute(p : player):
    open virtual chest with 1 rows named "%{a2}%" to {_p}
    format gui slot 0 of {_p} with barrier named "&c1 hour Mute" to run gui event
    format gui slot 1 of {_p} with barrier named "&c2 hour Mute" to run gui event
    format gui slot 2 of {_p} with clock named "Unmute" to run gui event
on gui click:
    if event-number is 0:
        close player's inventory
        add 60 to {mute.%{a2}%}
        send "muted %{a2}% for 2 hours"
        stop
    if event-number is 1:
        close player's inventory
        send "muted %{a2}% for 2 hours"
        add 120 to {mute.%{a2}%}
        stop
    if event-number is 2:
        close player's inventory
        clear {mute.%{a2}%}
        send "Unmuted %{a2}%"
        stop
on chat:
    if {mute.%{a2}%} is set:
        cancel event
        send "you are muted"
every 1 minute:
    if {mute.%{a2}%} is set:
        remove 1 from {mute.%{a2}%}
        if {mute.%{a2}%} is 0:
            clear {mute.%{a2}%}
command /punish [<player>]:
    trigger:
        if arg 1 is set:
            open virtual chest with 1 rows named "&8Punish %arg-1%" to player
            format gui slot 0 of player with barrier named "&cMute" to run function doMute(player)
            set {a2} to arg 1
 
You Need Tuske For This
Code:
function doMute(p : player):
    open virtual chest with 1 rows named "%{a2}%" to {_p}
    format gui slot 0 of {_p} with barrier named "&c1 hour Mute" to run gui event
    format gui slot 1 of {_p} with barrier named "&c2 hour Mute" to run gui event
    format gui slot 2 of {_p} with clock named "Unmute" to run gui event
on gui click:
    if event-number is 0:
        close player's inventory
        add 60 to {mute.%{a2}%}
        send "muted %{a2}% for 2 hours"
        stop
    if event-number is 1:
        close player's inventory
        send "muted %{a2}% for 2 hours"
        add 120 to {mute.%{a2}%}
        stop
    if event-number is 2:
        close player's inventory
        clear {mute.%{a2}%}
        send "Unmuted %{a2}%"
        stop
on chat:
    if {mute.%{a2}%} is set:
        cancel event
        send "you are muted"
every 1 minute:
    if {mute.%{a2}%} is set:
        remove 1 from {mute.%{a2}%}
        if {mute.%{a2}%} is 0:
            clear {mute.%{a2}%}
command /punish [<player>]:
    trigger:
        if arg 1 is set:
            open virtual chest with 1 rows named "&8Punish %arg-1%" to player
            format gui slot 0 of player with barrier named "&cMute" to run function doMute(player)
            set {a2} to arg 1
can i use tuske when skquery is on?
[doublepost=1570033308,1570033264][/doublepost]
There you go...
Code:
command /punish [<player>]:
    trigger:
        open virtual chest with 4 rows named "&8Punish %arg-1%" to player
        set slot 13 of player's current inventory to stone named "Clicked item"

on inventory click:
    if name of player's current inventory contains "Punish":
        cancel event
        name of clicked item is "Clicked item"
        set {_p} to subtext of name of player's current inventory from characters 10 to the length of name of player's current inventory
        wait 1 tick
        open virtual chest with 4 rows named "Another gui..." to player
        set slot 14 of player's current inventory to stone named "%{_p}%"

I used TuSke and Skellett for this :emoji_stuck_out_tongue:
can i use tuske when skquery is on?
 
There you go...
Code:
command /punish [<player>]:
    trigger:
        open virtual chest with 4 rows named "&8Punish %arg-1%" to player
        set slot 13 of player's current inventory to stone named "Clicked item"

on inventory click:
    if name of player's current inventory contains "Punish":
        cancel event
        name of clicked item is "Clicked item"
        set {_p} to subtext of name of player's current inventory from characters 10 to the length of name of player's current inventory
        wait 1 tick
        open virtual chest with 4 rows named "Another gui..." to player
        set slot 14 of player's current inventory to stone named "%{_p}%"

I used TuSke and Skellett for this :emoji_stuck_out_tongue:

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 ;-;
 
ya, send it :emoji_stuck_out_tongue:
Code:
on inventory click:
    if inventory name of player's current inventory is "&4» &cHelper Punish":
        if clicked slot is 15:
            open chest with 3 rows named "hi" to player
this is the code, when im clicking this is not opening the new gui
 
Code:
on inventory click:
    if inventory name of player's current inventory is "&4» &cHelper Punish":
        if clicked slot is 15:
            open chest with 3 rows named "hi" to player
this is the code, when im clicking this is not opening the new gui
Open chest is not vanilla syntax. It's skquery; open chest inventory would be the correct vanilla syntax
 
You Need Tuske For This
Code:
function doMute(p : player):
    open virtual chest with 1 rows named "%{a2}%" to {_p}
    format gui slot 0 of {_p} with barrier named "&c1 hour Mute" to run gui event
    format gui slot 1 of {_p} with barrier named "&c2 hour Mute" to run gui event
    format gui slot 2 of {_p} with clock named "Unmute" to run gui event
on gui click:
    if event-number is 0:
        close player's inventory
        add 60 to {mute.%{a2}%}
        send "muted %{a2}% for 2 hours"
        stop
    if event-number is 1:
        close player's inventory
        send "muted %{a2}% for 2 hours"
        add 120 to {mute.%{a2}%}
        stop
    if event-number is 2:
        close player's inventory
        clear {mute.%{a2}%}
        send "Unmuted %{a2}%"
        stop
on chat:
    if {mute.%{a2}%} is set:
        cancel event
        send "you are muted"
every 1 minute:
    if {mute.%{a2}%} is set:
        remove 1 from {mute.%{a2}%}
        if {mute.%{a2}%} is 0:
            clear {mute.%{a2}%}
command /punish [<player>]:
    trigger:
        if arg 1 is set:
            open virtual chest with 1 rows named "&8Punish %arg-1%" to player
            format gui slot 0 of player with barrier named "&cMute" to run function doMute(player)
            set {a2} to arg 1

Aye I like this skript alot but can u make one with perm banning, temp banning ya know that good stuff
 
Status
Not open for further replies.