Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function allow_metadata_inventory_take(pos, listname, index, stack, player)
- if minetest.is_protected(pos, player:get_player_name()) then
- return 0
- end
- local src_name = ""
- local amount = ""
- local camount = ""
- local meta = minetest.get_meta(pos)
- local bstack = ItemStack("")
- local inv = meta:get_inventory()
- if listname == "dst" then
- src_name = stack:get_name()
- if src_name =="ecm:coin" then
- amount = stack:get_count()
- camount = economy.get_money(player:get_player_name())
- economy.set_money(player:get_player_name(),camount + amount)
- return 0
- end
- end
- return stack:get_count()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement