Hello!
For a mod I am creating, I need to know the name of the player that destructs a block (the block is part of the mod).
I thought that on_destruct or after_destruct would do the trick, but it only gives me the pos of the block, not informations about the player.
How can I know which player is destroying a block? If possible before it is destroyed.
Thanks in advance!
[Solved] How can I get the name of the player who destucts a block?
[Solved] How can I get the name of the player who destucts a block?
Last edited by Oltarus on Sat May 21, 2022 05:03, edited 1 time in total.
- Festus1965
- Member
- Posts: 4181
- Joined: Sun Jan 03, 2016 11:58
- GitHub: Festus1965
- In-game: Festus1965 Thomas Thailand Explorer
- Location: Thailand ChiangMai
- Contact:
Re: How can I get the name of the player who destucts a block?
when the block is already part of the mod
add there inside a function on_dig ? asking for
so might get sure the right one ... did it
Code: Select all
minetest.register_node("", [ ...
Code: Select all
on_dig = function(pos, node, player)
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)
If urgend, you find me in Roblox (as CNXThomas)
Re: How can I get the name of the player who destucts a block?
I somehow missed on_dig (I'm new to moding). Thanks a lot!
Who is online
Users browsing this forum: No registered users and 5 guests