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.

Solved Add/Remove Player's Skull in GUI

Discussion in 'Skript' started by Runakai, May 5, 2018.

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

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    494
    Likes Received:
    31
    Hey, it's me again... I didn't know how to describe my problem in the title, so it may be misleading.

    Code (Skript):
    1.  
    2. command /report [<player>] [<text>]:
    3.     trigger:
    4.         if arg 1 is not set:
    5.             message "&8[&cReport&8] &7Bitte gebe einen Namen ein"
    6.             stop
    7.         if arg 2 is not set:
    8.             message "&8[&cReport&8] &7Bitte gebe einen Grund ein"
    9.             stop
    10.         {command.%player%.lastused} was less than 1 minute ago:
    11.             message "&8[&cReport&8] &7Bitte warte eine Minute, bevor du den Command erneut benutzt"
    12.             stop
    13.         set {command.%player%.lastused} to now
    14.         if arg 1 is set:
    15.             if arg 2 is set:
    16.                 send "&8[&cReport&8] &7Der Spieler &6%arg 1% &7wurde von dir für &6%arg-2% &7reported"
    17.                 log  "%sender% hat den Spieler <%arg 1%> für <%arg 2%> reportet"
    18.                 add 1 to {totalreports}
    19.                 set {wurdereportetvon::%player%} to player
    20.                 add player to {reportlist.%player%::*}
    21.                 add arg-1 to {wirdreportet.%player%::*}
    22.                 set {wirdreportetweil::%arg-1%} to arg-2
    23.                 loop all players:
    24.                     loop-player has permission "sk.report.see"
    25.                     send "&8[&cReport&8] &7Der Spieler &6%player% &7hat &6%arg-1% &7für &6%arg-2% &7reported" to loop-player
    26.                     send "&8[&cReport&8] &7Mache /reports, um die Reports anzusehen"
    27.                     if {totalreports} is more than 1:
    28.                         send "&8[&cReport&8] &7Es sind noch &e&n%{totalreports}% &7Reports offen"
    29.                     if {totalreports} is 1:
    30.                         send "&8[&cReport&8] &7Es ist noch &e&n%{totalreports}% &7Report offen"
    31.                     if {totalreports} is less than 1:
    32.                         send "&8[&cReport&8] &7Es sind keine Reports offen"
    33.                      
    34. command /reports:
    35.     permission: sk.reports.see
    36.     trigger:
    37.         set {_p} to player
    38.         open chest with 6 rows named "&cReports" to {_p}
    39.         wait a tick
    40.         set {_s} to 0
    41.         loop 54 times:
    42.             set slot {_s} of {_p}'s current inventory to air
    43.             {_s} is 36 or 37 or 38 or 39 or 40 or 41 or 42 or 43 or 44 or 45 or 53:
    44.                 set slot {_s} of {_p}'s current inventory to black stained glass pane named " "
    45.             add 1 to {_s}
    46.         set {_s} to 0
    47.         loop {wirdreportet.%{_p}%::*}:
    48.             loop-value is online:
    49.                 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%}%"
    50.                 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?
    --- Double Post Merged, May 5, 2018, Original Post Date: May 5, 2018 ---
    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 ?
     
  2. FabricioSouza

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    I'll see if I can help.
     
  3. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    494
    Likes Received:
    31
    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 ^^
     
  4. FabricioSouza

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    Please send me your variable from the list of reports so I can do this.
    --- Double Post Merged, May 5, 2018, Original Post Date: May 5, 2018 ---
    Send me your complete code, please.
     
  5. FabricioSouza

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    To close the thread you need to edit your title and put it as SOLVED.
     
    • Like Like x 1
  6. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    494
    Likes Received:
    31
    Thanks!
     
  7. FabricioSouza

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    You're welcome.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...