Back to Blog
Scripts3 min read

Agency-Housing: Build FiveM Houses In Game, Not in a Config File

Place the entrance, draw the border from the air, pick one of 18 shells. Agency-Housing runs on QBCore, QBox, ESX or standalone and saves to MySQL.

Agency Scripts

Founder and Lead Developer at Agency Scripts

Documentation

Every command, setting and export of Agency-Housing in one place.

Open Docs

Houses Are Built in the City

Agency-Housing is a database driven housing system for FiveM, and houses are created in game through a creator instead of a config file full of coordinates. An admin runs /acreatehouse, places the entrance where they stand, marks the property border, picks a shell, names and prices the house and saves it. From that moment the house exists for every player and is stored in MySQL.

The script detects QBCore, QBox and ESX by itself and runs fully standalone without any framework. Its database tables create themselves on the first start.

The Creator

  • Entrance: placed exactly where the admin stands.
  • Property border: marked from the air and stored as a PolyZone.
  • Interior: one of 18 shells, or a custom interior recorded in game.
  • Map blips: set per house.

The menus come in seven accent colours, so the housing interface fits the look of your server.

What Owners Can Do

  • Buy and sell houses, with configurable refunds and a limit per player.
  • Hand keys to other players and take them back.
  • Furnish the whole plot with up to 60 props.
  • Lock and unlock real MLO doors they hold a key to.
  • Use garage, storage and wardrobe points and install house upgrades.
  • Answer the doorbell.

Two keys do most of the work: F7 opens the housing menu and F3 opens the owner menu on your own property. E enters a house at the door marker, answers the doorbell and locks or unlocks MLO doors. Every command starts with an "a", such as /ahousing and /ahousemenu, so it never collides with other resources.

A Wardrobe of Its Own

Since version 1.0.2, Agency-Housing has a built-in wardrobe. Players save what they are wearing under a name and put it back on at any wardrobe in their houses, up to 20 outfits each. No clothing script is needed, on every framework and standalone. Where illenium-appearance or qb-clothing is installed, the script finds it by itself. Admins open the built-in wardrobe anywhere with /ahwardrobe.

Framework, or None at All

With the config left on auto, the script picks the framework by itself, even one that starts late, and the console says on every start what it found. Without QBCore, QBox or ESX it runs standalone: players are told apart by their Rockstar licence, admins come from ACE or a licence list in the config, and money goes through three small hooks. If you prefer, houses can simply be free.

Buying, selling, keys, furniture, upgrades, MLO doors, the doorbell and the Companion app work and save exactly as on a framework server.

Storage is detected the same way. It opens with ox_inventory, qb-inventory 1 and 2, qs, ps, lj and jpr. On a server without an inventory, the storage point is simply not offered.

No SQL Import

Every table and every new column is created on the first start, on MariaDB and MySQL 8. For servers whose database user may not create tables, sql/install.sql is still included.

Manage Houses From the Real World

Agency-Housing pairs with the free Agency Companion app on iOS, Android, iPad, Mac and Apple Watch. Players lock and unlock, hand out and take back keys, answer the doorbell, buy and sell houses and set a route to any of their properties. Staff can teleport, list houses for sale or delete them.

Pairing works through /ahconnect, short /ahc, with a QR code or a six digit code. The server needs outbound HTTPS to api.agencyg.de.

Updating to 1.0.2

The update is free for everyone who already owns Agency-Housing. The config has a new standalone block and new wardrobe options, so back up your values, use the new config.lua and set them again. Houses, keys, furniture and Companion pairings survive the update, and nothing has to be imported. The manifest changed, so run refresh before restarting the resource, or restart the server.

Get Agency-Housing

Agency-Housing is available in the Agency Scripts shop, and the documentation lists every command, config option and export.

The matching script

Ready-made for your server, updates included.

Ready to Get Started?

Get the scripts from our shop, or join the Discord for support, updates and a look at what is coming.