Solved keepInventory

  • 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.
Dec 19, 2019
31
2
8
19
I wanna make a code that let you drop you items on death when you got killed by a player and when not it wouldn't drop your items. I have tried this but it doesn't work. Can anyone help me?

Code:
on death:
    if attacker is a player:
        if victim is a player:
            execute console command "/gamerule keepInventory false"
            wait 1 tick
            execute console command "/gamerule keepInventory true"
 
Status
Not open for further replies.