> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaksam-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get all buildings list

> Récupère les données de tous les bâtiments côté serveur.

```lua Export theme={null}
exports["doors_creator"]:getAllBuildings()
```

### Valeur de retour

Une table avec les données de tous les bâtiments.

## Exemple

```lua theme={null}
Citizen.CreateThread(function()
    local buildings = exports["doors_creator"]:getAllBuildings()

    for k, buildingData in pairs(buildings) do
        if(buildingData.allowedJobs and buildingData.allowedJobs["police"]) then
            print(buildingData.label .. " is a police building")
        end
    end
end)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.