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.

Help

Discussion in 'Skript' started by dfsdfas, Aug 13, 2020.

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

    dfsdfas New Member

    Joined:
    Jul 22, 2020
    Messages:
    7
    Likes Received:
    0
    I want to check if the player making the right Is in spectator mode, but when I put player executing right click it’s making me an error, I’m making a Skript that allows spectator see survival players inventory on right click them


    Code (Text):
    1. on right click on a player:
    2.     if event-player's gamemode is spectator:
    3.         set {_Chest} to player's inventory
    4.         add helmet of player to {_Chest}
    5.         add chestplate of player to {_Chest}
    6.         add leggings of player to {_Chest}
    7.         add boots of player to {_Chest}
    8.         show chest inventory with 5 rows named "&7»&ePlayer Inventory&7»" to player
    9.         set the inventory of chest named "&7»&ePlayer Inventory&7»" to {_Chest}
    10.  
     
    #1 dfsdfas, Aug 13, 2020
    Last edited: Aug 13, 2020
  2. Hackusater

    Hackusater Active Member

    Joined:
    Aug 5, 2017
    Messages:
    74
    Likes Received:
    2
    Code (Text):
    1. on right click on a player:
    2.     if player's gamemode is spectator:
    3.         set {_Chest} to the player inventory
    4.         add helmet of player to {_Chest}
    5.         add chestplate of player to {_Chest}
    6.         add leggings of player to {_Chest}
    7.         add boots of player to {_Chest}
    8.         add off hand of player to {_Chest}
    9.         open chest with 5 rows named "&7»&ePlayer Inventory&7»" to player
    10.         set the inventory of chest named "&7»&ePlayer Inventory&7»" to {_Chest}
     
  3. dfsdfas

    dfsdfas New Member

    Joined:
    Jul 22, 2020
    Messages:
    7
    Likes Received:
    0
    this works, but now I have another problem

    Error:
    Code (Text):
    1. chest named "&7»&ePlayer Inventory&7»" is not an inventory holder (invsee.sk, line 9: set the inventory of chest named "&7»&ePlayer Inventory&7»" to {_Chest}')
     
  4. Hackusater

    Hackusater Active Member

    Joined:
    Aug 5, 2017
    Messages:
    74
    Likes Received:
    2
    set the inventory of chest

    please just read that.
    ;-;
    player, not chest
     
  5. dfsdfas

    dfsdfas New Member

    Joined:
    Jul 22, 2020
    Messages:
    7
    Likes Received:
    0
    no, I want to open a new chest with the inventory of the player you're clicking
     
  6. Hackusater

    Hackusater Active Member

    Joined:
    Aug 5, 2017
    Messages:
    74
    Likes Received:
    2
    player's current inventory
     
Thread Status:
Not open for further replies.

Share This Page

Loading...