Skip to content

Instantly share code, notes, and snippets.

@appgurueu
Created December 27, 2021 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save appgurueu/e89a2f067bca6d07e0b0f1d7da7e5618 to your computer and use it in GitHub Desktop.
Save appgurueu/e89a2f067bca6d07e0b0f1d7da7e5618 to your computer and use it in GitHub Desktop.
local to_receive = {}
for player in modlib.minetest.connected_players() do
to_receive[player:get_player_name()] = true
end
minetest.dynamic_add_media(path, function(name)
to_receive[name] = nil
if not next(to_receive) then -- all players have supposedly received their media
-- do something
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment