Solved On death cancel drop

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

    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.
code_language.skript:
on death of player:
    clear drops
    set {inv::%victim%::*} to items in player's inventory

on respawn: #is this an event?
    add {inv::%player%::*} to player's inventory
i think this would work not 100% sure
 
This is a command in-game: /gamerule keepInventory true
Not all of the players.
My full code:
code_language.skript:
on death of player:
    if victim have a blaze rod named "Mentőrúd":
        remove 1 blaze rod named "Mentőrúd" from the victim
        don't drop anything
 
@PantherBoy
code_language.skript:
on death of player:
    add drops to victim's inventory
    remove drops from the drops
 
Player don't get the dropped items
So , try in this way:
code_language.skript:
on death of player:
    set {_drops::*} to drops
    remove drops from the drops
    add {_drops::*} to victim's inventory
 
I think that's the same problem of the "on drop" event.
Can you add "broadcast %{_drops::*}%" and post here the output?
 
Try with a delay:
code_language.skript:
on death of player:
    set {_drops::*} to drops
    remove drops from the drops
    wait 5 ticks
    add {_drops::*} to victim's inventory
 
Status
Not open for further replies.