Solved Add/Remove Player's Skull 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.

Runakai

Supporter
Apr 27, 2018
496
32
28
21
Hey, it's me again... I didn't know how to describe my problem in the title, so it may be misleading.

code_language.skript:
command /report [<player>] [<text>]:
    trigger:
        if arg 1 is not set:
            message "&8[&cReport&8] &7Bitte gebe einen Namen ein"
            stop
        if arg 2 is not set:
            message "&8[&cReport&8] &7Bitte gebe einen Grund ein"
            stop
        {command.%player%.lastused} was less than 1 minute ago:
            message "&8[&cReport&8] &7Bitte warte eine Minute, bevor du den Command erneut benutzt"
            stop
        set {command.%player%.lastused} to now
        if arg 1 is set:
            if arg 2 is set:
                send "&8[&cReport&8] &7Der Spieler &6%arg 1% &7wurde von dir für &6%arg-2% &7reported"
                log  "%sender% hat den Spieler <%arg 1%> für <%arg 2%> reportet"
                add 1 to {totalreports}
                set {wurdereportetvon::%player%} to player
                add player to {reportlist.%player%::*}
                add arg-1 to {wirdreportet.%player%::*}
                set {wirdreportetweil::%arg-1%} to arg-2
                loop all players:
                    loop-player has permission "sk.report.see"
                    send "&8[&cReport&8] &7Der Spieler &6%player% &7hat &6%arg-1% &7für &6%arg-2% &7reported" to loop-player
                    send "&8[&cReport&8] &7Mache /reports, um die Reports anzusehen"
                    if {totalreports} is more than 1:
                        send "&8[&cReport&8] &7Es sind noch &e&n%{totalreports}% &7Reports offen"
                    if {totalreports} is 1:
                        send "&8[&cReport&8] &7Es ist noch &e&n%{totalreports}% &7Report offen"
                    if {totalreports} is less than 1:
                        send "&8[&cReport&8] &7Es sind keine Reports offen"
                      
command /reports:
    permission: sk.reports.see
    trigger:
        set {_p} to player
        open chest with 6 rows named "&cReports" to {_p}
        wait a tick
        set {_s} to 0
        loop 54 times:
            set slot {_s} of {_p}'s current inventory to air
            {_s} is 36 or 37 or 38 or 39 or 40 or 41 or 42 or 43 or 44 or 45 or 53:
                set slot {_s} of {_p}'s current inventory to black stained glass pane named " "
            add 1 to {_s}
        set {_s} to 0
        loop {wirdreportet.%{_p}%::*}:
            loop-value is online:
                set slot {_s} of {_p}'s current inventory to loop-value's skull named "&7%loop-value%" with lore "&7Von: %{wurdereportetvon::%{_p}%}%||&7wegen: &e%{wirdreportetweil::%loop-value%}%"
                add 1 to {_s}

So, the Player's Skull is added to the GUI and everything is good, but i really dont know how to do when a supporter clicks on the skull that the supporter will be teleported to the player, and the player's skull will be removed by the inventory. And, if more than 54 player's will be reported, what will happen? How can i do like more pages in a GUI?
[doublepost=1525528430,1525526138][/doublepost]
Hey, it's me again... I didn't know how to describe my problem in the title, so it may be misleading.

code_language.skript:
command /report [<player>] [<text>]:
    trigger:
        if arg 1 is not set:
            message "&8[&cReport&8] &7Bitte gebe einen Namen ein"
            stop
        if arg 2 is not set:
            message "&8[&cReport&8] &7Bitte gebe einen Grund ein"
            stop
        {command.%player%.lastused} was less than 1 minute ago:
            message "&8[&cReport&8] &7Bitte warte eine Minute, bevor du den Command erneut benutzt"
            stop
        set {command.%player%.lastused} to now
        if arg 1 is set:
            if arg 2 is set:
                send "&8[&cReport&8] &7Der Spieler &6%arg 1% &7wurde von dir für &6%arg-2% &7reported"
                log  "%sender% hat den Spieler <%arg 1%> für <%arg 2%> reportet"
                add 1 to {totalreports}
                set {wurdereportetvon::%player%} to player
                add player to {reportlist.%player%::*}
                add arg-1 to {wirdreportet.%player%::*}
                set {wirdreportetweil::%arg-1%} to arg-2
                loop all players:
                    loop-player has permission "sk.report.see"
                    send "&8[&cReport&8] &7Der Spieler &6%player% &7hat &6%arg-1% &7für &6%arg-2% &7reported" to loop-player
                    send "&8[&cReport&8] &7Mache /reports, um die Reports anzusehen"
                    if {totalreports} is more than 1:
                        send "&8[&cReport&8] &7Es sind noch &e&n%{totalreports}% &7Reports offen"
                    if {totalreports} is 1:
                        send "&8[&cReport&8] &7Es ist noch &e&n%{totalreports}% &7Report offen"
                    if {totalreports} is less than 1:
                        send "&8[&cReport&8] &7Es sind keine Reports offen"
                     
command /reports:
    permission: sk.reports.see
    trigger:
        set {_p} to player
        open chest with 6 rows named "&cReports" to {_p}
        wait a tick
        set {_s} to 0
        loop 54 times:
            set slot {_s} of {_p}'s current inventory to air
            {_s} is 36 or 37 or 38 or 39 or 40 or 41 or 42 or 43 or 44 or 45 or 53:
                set slot {_s} of {_p}'s current inventory to black stained glass pane named " "
            add 1 to {_s}
        set {_s} to 0
        loop {wirdreportet.%{_p}%::*}:
            loop-value is online:
                set slot {_s} of {_p}'s current inventory to loop-value's skull named "&7%loop-value%" with lore "&7Von: %{wurdereportetvon::%{_p}%}%||&7wegen: &e%{wirdreportetweil::%loop-value%}%"
                add 1 to {_s}

So, the Player's Skull is added to the GUI and everything is good, but i really dont know how to do when a supporter clicks on the skull that the supporter will be teleported to the player, and the player's skull will be removed by the inventory. And, if more than 54 player's will be reported, what will happen? How can i do like more pages in a GUI?
So.. I figured out how to remove the skull and teleport the player to the reported player. I dont know how to delete the post so i am asking now: How can i do multible pages ?
 
Hey, it's me again... I didn't know how to describe my problem in the title, so it may be misleading.

code_language.skript:
command /report [<player>] [<text>]:
    trigger:
        if arg 1 is not set:
            message "&8[&cReport&8] &7Bitte gebe einen Namen ein"
            stop
        if arg 2 is not set:
            message "&8[&cReport&8] &7Bitte gebe einen Grund ein"
            stop
        {command.%player%.lastused} was less than 1 minute ago:
            message "&8[&cReport&8] &7Bitte warte eine Minute, bevor du den Command erneut benutzt"
            stop
        set {command.%player%.lastused} to now
        if arg 1 is set:
            if arg 2 is set:
                send "&8[&cReport&8] &7Der Spieler &6%arg 1% &7wurde von dir für &6%arg-2% &7reported"
                log  "%sender% hat den Spieler <%arg 1%> für <%arg 2%> reportet"
                add 1 to {totalreports}
                set {wurdereportetvon::%player%} to player
                add player to {reportlist.%player%::*}
                add arg-1 to {wirdreportet.%player%::*}
                set {wirdreportetweil::%arg-1%} to arg-2
                loop all players:
                    loop-player has permission "sk.report.see"
                    send "&8[&cReport&8] &7Der Spieler &6%player% &7hat &6%arg-1% &7für &6%arg-2% &7reported" to loop-player
                    send "&8[&cReport&8] &7Mache /reports, um die Reports anzusehen"
                    if {totalreports} is more than 1:
                        send "&8[&cReport&8] &7Es sind noch &e&n%{totalreports}% &7Reports offen"
                    if {totalreports} is 1:
                        send "&8[&cReport&8] &7Es ist noch &e&n%{totalreports}% &7Report offen"
                    if {totalreports} is less than 1:
                        send "&8[&cReport&8] &7Es sind keine Reports offen"
                     
command /reports:
    permission: sk.reports.see
    trigger:
        set {_p} to player
        open chest with 6 rows named "&cReports" to {_p}
        wait a tick
        set {_s} to 0
        loop 54 times:
            set slot {_s} of {_p}'s current inventory to air
            {_s} is 36 or 37 or 38 or 39 or 40 or 41 or 42 or 43 or 44 or 45 or 53:
                set slot {_s} of {_p}'s current inventory to black stained glass pane named " "
            add 1 to {_s}
        set {_s} to 0
        loop {wirdreportet.%{_p}%::*}:
            loop-value is online:
                set slot {_s} of {_p}'s current inventory to loop-value's skull named "&7%loop-value%" with lore "&7Von: %{wurdereportetvon::%{_p}%}%||&7wegen: &e%{wirdreportetweil::%loop-value%}%"
                add 1 to {_s}

So, the Player's Skull is added to the GUI and everything is good, but i really dont know how to do when a supporter clicks on the skull that the supporter will be teleported to the player, and the player's skull will be removed by the inventory. And, if more than 54 player's will be reported, what will happen? How can i do like more pages in a GUI?
[doublepost=1525528430,1525526138][/doublepost]
So.. I figured out how to remove the skull and teleport the player to the reported player. I dont know how to delete the post so i am asking now: How can i do multible pages ?

I'll see if I can help.
 
Please send me your variable from the list of reports so I can do this.
[doublepost=1525530745,1525530680][/doublepost]
I have figured it out! everything is working alright. I'm just waiting the post to be deleted. I don't know how/if i can do this so i reported my thread ^^

Send me your complete code, please.
 
Status
Not open for further replies.