add player.get_selected_entity(...) & update docs

This commit is contained in:
MihailRis
2024-07-14 12:00:58 +03:00
parent c17f3fec54
commit e73ccaded1
5 changed files with 72 additions and 43 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ function on_fall()
end
function on_sensor_enter(index, oid)
local playerentity = player.get_entity(hud.get_player()):get_uid()
local playerentity = player.get_entity(hud.get_player())
if ready and oid == playerentity and index == 0 then
entity:despawn()
inventory.add(player.get_inventory(oid), dropitem.id, dropitem.count)