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!


    You can always check our 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.

Store event joined players in variable like {e::ccevents::%{_joinedplayers}%::players::*}

Discussion in 'Skript' started by VojaFTW, Jul 18, 2017.

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

    VojaFTW Active Member

    Jun 10, 2017
    Likes Received:
    Hello, if you reading this now you are here to help me make a list and in that list to store all player joined a event.

    So here is me code:
    INFO: In code i don't implement a feature of list soo i need a way to make it.

    Code (Skript):
    1. command /hostevent:
    2.     permission: cc.command.hostevent
    3.     permission message: &cInvalid permission, sorry.
    4.     trigger:
    5.         if {cc.event.%player%} is not set:
    6.             send "&0[&3&l%{ePrefix}%&0] &3%player%'s Event-1 successfully created. You will be sent to it shortly."
    7.             send "&0[&3&l%{ePrefix}%&0] &3If you haven't been send in 20 seconds, type /mv tp %player%'s Event-1"
    8.             copy dir "plugins/CamCraftCore/CCEvents/eventmap/map1" to "plugins/CamCraftCore/CCEvents/%player%'s Event-1/"
    9.             wait 10 ticks
    10.             load world "plugins/CamCraftCore/CCEvents/%player%'s Event-1"
    11.             wait 20 seconds
    12.             skellett teleport player to world "plugins/CamCraftCore/CCEvents/%player%'s Event-1" spawn
    13.             set {cc.event.join.%player%} to true
    14.         else:
    15.             send "&0[&3&l%{ePrefix}%&0] &3Your event is still being created or already exists. If you haven't been send in 20 seconds, type /mv tp %player%'s Event-1."
    17. command /closeevent:
    18.     permission: cc.command.eventclose
    19.     permission message: &cInvalid permission, sorry.
    20.     trigger:
    21.         loop all players:
    22.             loop-player's world is "plugins/CamCraftCore/CCEvents/%player%'s Event-1"
    23.                 if {cc.event.join.%player%} is true
    24.                     teleport all players to spawn of "world"
    25.         unload world "plugins/CamCraftCore/CCEvents/%player%'s Event-1"
    26.         wait 2 seconds
    27.         delete folder "plugins/CamCraftCore/CCEvents/%player%'s Event-1/data"
    28.         delete folder "plugins/CamCraftCore/CCEvents/%player%'s Event-1/region"
    29.         delete folder "plugins/CamCraftCore/CCEvents/%player%'s Event-1/playerdata"
    30.         wait 2 ticks
    31.         delete file "plugins/CamCraftCore/CCEvents/%player%'s Event-1/level.dat"
    32.         delete file "plugins/CamCraftCore/CCEvents/%player%'s Event-1/uid.dat"
    33.         delete file "plugins/CamCraftCore/CCEvents/%player%'s Event-1/level.dat_old"
    34.         wait 2 ticks
    35.         delete file "plugins/CamCraftCore/CCEvents/%player%'s Event-1/session.lock"
    36.         delete folder "plugins/CamCraftCore/CCEvents/%player%'s Event-1"
    37.         wait 2 ticks
    38.         message "&0[&3&l%{eprefix}%&0] &3Successfully removed your event."
    39.         delete {cc.event.%player%}
    40.         delete {cc.event.join.%player%}
    Thanks in advance.
  2. ShaneBee

    Supporter + Addon Developer

    Sep 7, 2017
    Likes Received:
    idk what exactly you want, but to add a player to a list:
    Code (Skript):
    1. add player to {list::*}
  3. ShaneBee

    Supporter + Addon Developer

    Sep 7, 2017
    Likes Received:
    That can done job but i mean to make a group like i write in title so i can store all players in that group but i see you solve my problem so thank you. But how to test all player from that list and how to get specific player from that list???
    #3 ShaneBee, Jul 19, 2017
    Last edited by a moderator: Jul 19, 2017
Thread Status:
Not open for further replies.