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

  • 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.

VojaFTW

Member
Jun 10, 2017
42
2
0
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_language.skript:
command /hostevent:
    permission: cc.command.hostevent
    permission message: &cInvalid permission, sorry.
    trigger:
        if {cc.event.%player%} is not set:
            send "&0[&3&l%{ePrefix}%&0] &3%player%'s Event-1 successfully created. You will be sent to it shortly."
            send "&0[&3&l%{ePrefix}%&0] &3If you haven't been send in 20 seconds, type /mv tp %player%'s Event-1"
            copy dir "plugins/CamCraftCore/CCEvents/eventmap/map1" to "plugins/CamCraftCore/CCEvents/%player%'s Event-1/"
            wait 10 ticks
            load world "plugins/CamCraftCore/CCEvents/%player%'s Event-1"
            wait 20 seconds
            skellett teleport player to world "plugins/CamCraftCore/CCEvents/%player%'s Event-1" spawn
            set {cc.event.join.%player%} to true
        else:
            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."

command /closeevent:
    permission: cc.command.eventclose
    permission message: &cInvalid permission, sorry.
    trigger:
        loop all players:
            loop-player's world is "plugins/CamCraftCore/CCEvents/%player%'s Event-1"
                if {cc.event.join.%player%} is true
                    teleport all players to spawn of "world"
        unload world "plugins/CamCraftCore/CCEvents/%player%'s Event-1"
        wait 2 seconds
        delete folder "plugins/CamCraftCore/CCEvents/%player%'s Event-1/data"
        delete folder "plugins/CamCraftCore/CCEvents/%player%'s Event-1/region"
        delete folder "plugins/CamCraftCore/CCEvents/%player%'s Event-1/playerdata"
        wait 2 ticks
        delete file "plugins/CamCraftCore/CCEvents/%player%'s Event-1/level.dat"
        delete file "plugins/CamCraftCore/CCEvents/%player%'s Event-1/uid.dat"
        delete file "plugins/CamCraftCore/CCEvents/%player%'s Event-1/level.dat_old"
        wait 2 ticks
        delete file "plugins/CamCraftCore/CCEvents/%player%'s Event-1/session.lock"
        delete folder "plugins/CamCraftCore/CCEvents/%player%'s Event-1"
        wait 2 ticks
        message "&0[&3&l%{eprefix}%&0] &3Successfully removed your event."
        delete {cc.event.%player%}
        delete {cc.event.join.%player%}

Thanks in advance.
 
idk what exactly you want, but to add a player to a list:
code_language.skript:
add player to {list::*}

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???
 
Last edited by a moderator:
Status
Not open for further replies.