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.

Two things about minigames

Discussion in 'Skript' started by ThanasiShadoW, Jun 6, 2017.

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

    ThanasiShadoW Member

    Joined:
    Feb 4, 2017
    Messages:
    1
    Likes Received:
    0
    I am making a minigame and i want to make a working lobby (players will wait there untill more players join). The problem is that i don't know how to save/load inventories and prevent them from using other commands. Any ideas?
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    220
    Code (Skript):
    1. on quit:
    2.     set {_s} to 0
    3.     loop 9*4 times:
    4.         set {Inv::%player%::%{_s}%} to "%player's slot loop-number -1%"
    5.         add 1 to {_s}
    6.  
    7. on join:
    8.     wait a ticks
    9.     broadcast "%{Inv::%player%::*}%"
    10.     loop {Inv::%player%::*}:
    11.         set slot ("%loop-index%" parsed as number) of player to ("%loop-value%" parsed as item)
    12.     delete {Inv::%player%::*}
    This is mine old code for Bungee server.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...