# Adding tables

> Put a playable pool table anywhere, with one line per table.

You don't need this for tables that are already in the world. Every `prop_pooltable_02` and `prop_pooltable_3b` on the map, inside MLOs too, is picked up on its own while `mapTables = true`.

## Adding a table

In `config/config.lua`, add one line per table to `tables`:

```lua
tables = {
    vec4(-1586.32, -985.64, 12.07, 140.0),
    vec4(  123.40,  -1290.10, 28.27,  30.0),
},
```

Each line is the **floor point** under the middle of the table, and the way it faces (heading in degrees).

If a map or MLO table already sits at that spot, the script uses it. Otherwise it places a `prop_pooltable_02` there for every player within `spawnDistance`.

## Getting the numbers

1. Stand where the middle of the table should be.
2. Read your position and heading with your admin menu or any coordinates tool you already use.
3. Use the **ground** height for `z`, not your head or the camera. Most tools give the ped's position, which is about 1 m above the floor — subtract that.

Restart the resource and walk up to it. If the table floats or sinks, adjust `z` by a few centimetres.

> [!TIP]
> Turn the heading in steps of 90° until the table lines up with the room, then fine-tune.

## Turning map tables off

Set `mapTables = false` to use **only** the tables you list. Useful if your server has pool tables in places you don't want people playing.
