06 · Property · Job and housing system
Real Estate Job
The biggest job so far. Agents place buildings on the map, attach apartments to them, then sell or rent those properties to players. Owners and tenants get keys, storage, a doorbell and control over who comes in, and everything sits in the database so it survives restarts.
- 5 interiors ready to sell
- 10 database tables, created through SQL migrations
- 365 days, the longest lease
- 7 days of grace before an expired property is freed
How it works
Start to finish
-
The agent F6 menu: every property with its lease status, one available and one rented out 1 / 3 01 — The agent
Buildings, apartments, sales and rentals
- Five interiors ready to sell (basic and mid-range apartments, luxury villa, warehouse, casino house), each with its own entry point, preview camera and storage size.
- Sales and rentals: the agent sets the price or the daily rent; leases run up to 365 days with extensions and a 7-day grace period, then an hourly sweep frees expired properties on its own.
- Agent side: F6 job menu with grades, a builder tool to place buildings in the world, plus tools to migrate houses left over from the old housing script.
-
The owner tablet inside the property, on the keys tab: the tenant holds the door key and the stash key 2 / 3 02 — The owner
Keys, occupants and a doorbell
- Owner tablet (NUI): grant and revoke keys, kick occupants, and a doorbell so guests can ring and be let in or turned away.
- When a lease ends, the tenant's belongings are moved to an agency locker instead of being deleted.
- Police can force a door open for a raid (job and grade configurable); the owner gets notified and pays to have the door repaired.
-
Inside the casino-house property: the sofa, the wall-mounted TV with its DVD player and the gym ball are all player-placed furniture 3 / 3 03 — Inside
One interior, many owners
- Shared MLO interiors are instanced per property with routing buckets, so two owners of the same apartment type never meet; if you log out inside, you come back into the right instance.
- Economy rules in config: sale tax, sell-back rate, rent limits.
- A full end-to-end test run was recorded on the dev server; the job was also ported to a standalone ox_lib version.
Under the hood
What keeps it solid
Data
- Ten database tables, from properties and leases to the furniture catalogue, all created through SQL migrations.
Instancing
- Routing buckets per property, with the right instance restored on login.
Portability
- Repackaged as a standalone ox_lib build for a different server.
Tech
Tech and package
- Client script
- Server script
- Config
- Two NUI appsowner tablet, furniture editor
Need something like this on your server?