if a player disconnects his loots falls in a cheat

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

Mcu

Member
Aug 14, 2022
1
0
1
on disconnect:​
set block at player to chest​
set {_block} to block at location of player​
add inventory of player to {_block}​
add helmet of player to {_block}​
add chestplate of player to {_block}​
add leggings of player to {_block}​
add boots of player to {_block}​
clear drops


This isnt working only chest is showing up without anything in it
 
Code:
on disconnect:
    set block at player to chest
    set {_block} to block at player
    set {_slot} to 0
    loop 36 times:
        set {_item} to slot {_slot} of player's inventory
        add "%{_item}%" to {items::%player%::*}
        add 1 to {_slot}
    loop {items::%player%::*}:
        add (loop-value parsed as item type) to {_block}'s inventory
    add helmet of player to {_block}'s inventory
    add chestplate of player to {_block}'s inventory
    add leggings of player to {_block}'s inventory
    add boots of player to {_block}'s inventory
    delete {items::%player%::*}
 
Status
Not open for further replies.