Jump to content

(Solved) Way to check who gave container an item or took an item from it?


Recommended Posts

I believe this is relevant for your situation.


Perhaps something like this.

local function OnItemGet(inst, data)
		local player = inst.components.container.currentuser

        if data and data.item then
                print(player, "put", data.item, "in a container.")
        end
end

inst:ListenForEvent("itemget", OnItemGet)

 

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...