Solved remove and add to players inventory

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

May 13, 2020
14
0
0
20
I need a script that would make it so when the player spawns into the server their inventory is empty but when they do /warp netherpvp they get added a chest named: '&aKit Selector &7(Right Click)' into their first slot of their hotbar??

please help asap
 
I need a script that would make it so when the player spawns into the server their inventory is empty but when they do /warp netherpvp they get added a chest named: '&aKit Selector &7(Right Click)' into their first slot of their hotbar??

please help asap
Something like this?
code_language.skript:
on join:
    wait a tick
    clear player's inventory

on command "/warp netherpvp":
    set slot 1 of player's current inventory to chest named "&aKit Selector &7(Right Click)"
 
yes thats it, but i want it so when they go back to /spawn it clears their inventory again
Then add to the code:
code_language.skript:
on command "/spawn":
    clear player's inventory
Be careful with the CombatLog plugins you have. If the player is in combat and uses the /spawn, all items will be deleted. If you have your server's spawn in a separate world, do this:
code_language.skript:
on player world change:
    if world is "spawn":
        clear player's inventory
 
It works perfectly. But i have one more issue, I did /setworldspawn and /setspawn and it works for new players but when I join it teleports me to my previous spawn??
 
It works perfectly. But i have one more issue, I did /setworldspawn and /setspawn and it works for new players but when I join it teleports me to my previous spawn??
I recommend you create your own 'setspawn' skript. Avoid problems like the one you just told me.
code_language.skript:
command /setspawn:
    permission: setspawn.use
    trigger:
        set {spawn} to player's location
        send "&aThe spawn has been set!"

command /spawn:
    trigger:
        teleport player to {spawn}

on join:
    teleport player to {spawn}
on first join:
    teleport player to {spawn}
 
I got a warp sign and the chest doesn't give it to the player bec they don't use /warp netherpvp anymore.. How would I make it so they receive the chest on right click of that certain sign?

Sign:
[Warp]
netherpvp
everyone
 
I got a warp sign and the chest doesn't give it to the player bec they don't use /warp netherpvp anymore.. How would I make it so they receive the chest on right click of that certain sign?

Sign:
[Warp]
netherpvp
everyone
Be sure to create another post when you have a question apart from the original post. For your answer this would work:
code_language.skript:
on right click on sign:
    line 1 is "[Warp]":
        line 2 is "netherpvp":
            line 3 is "everyone":
                player command "warp netherpvp"
Mark the post as solved if you had what you wanted from the start.