# Actions

## Functions

#### mlbb.room

`mlbb.room()`: table

Returns the current match's room info (players, ids and the match metadata the room carries), or an empty table when no room is known.

#### mlbb.entities

`mlbb.entities()`: table

Returns `{ ready, local_player?, enemies, teammates }`.

- `local_player` is present when known: `{ position, head }`, both world coordinates.
- `enemies` and `teammates` are arrays of entities.

Each entity is `{ guid, health, maximum_health, skin_id, dead, visible, position }`. A field is absent when the game did not have it this frame; `visible` is always set (enemies carry the live visibility flag, teammates are always true).

```lua
client.set_event_callback("paint", function()
  local e = mlbb.entities()
  if not e.ready then return end
  for _, enemy in ipairs(e.enemies) do
    if enemy.visible and enemy.position then
      local sx, sy = renderer.world_to_screen(enemy.position.x, enemy.position.y, enemy.position.z)
      if sx then renderer.text(sx, sy, 255, 80, 80, 255, "c", 0, tostring(enemy.health)) end
    end
  end
end)
```