Realtor, Buying & Selling
Every house for sale is on one realtor page. Players reach it at the house's own porch, at the agency desk, or through a player realtor. Tower flats are not on this market. They are sold at the tower's front desk.
The Realtor Page
The page shows a list of every house for sale beside a map of San Andreas (satellite or atlas). Each house has a pin with its price where it stands. Pins that are close together gather into a bubble that zooms in on them.
- Search a street or an area.
- Sort by price, size or distance.
- Narrow the list to an area.
A listing shows:
- Its photo. A house without one shows its roof from the satellite map.
- What it has: floor area, storeys, basement and garage.
- Its price per m² and how far away it is.
- Its floor plan: the walk-in pack's ground floor, with the street door at the bottom.
From a listing a player can:
- Set a GPS route. A blip also flashes on the house for a while.
- Look at it from the street. The camera goes to the house and turns round it. Drag to look about, scroll to move closer.
- Buy it, where buying is allowed.
Ways to Buy
| Way | Setting | How it works |
|---|---|---|
| At the door | Buy.Door | The porch prompt of a house for sale opens its listing. |
| At the agency | Buy.Office | A ped at a desk, with a blip. Anyone looks through the listings and buys there. |
| From a realtor | Job.Enabled | A player with the realtor job sells the house to the client beside them. |
With Buy.OnlyWhenNoAgents = true players can buy by themselves only while no realtor is on duty. Turn Buy.Door and Buy.Office off and only realtors sell houses.
A property is paid for from Properties.Account. A character may own up to Properties.MaxOwned properties. With Doors.LockOnPurchase = true a property is bought with its doors locked.
The Agency Desk
The agency is a ped standing at each position in Office.Locations. The default is in front of the offices on West Eclipse Boulevard in West Vinewood. The map has no Dynasty 8 office of its own, so move the desk into your agency's MLO if you have one. Positions are vec4(x, y, z, heading).
Players use the ped through the target resource, or through a prompt when none runs.
Player Realtors
Players with a job in Job.Jobs (realestate from grade 0 by default) open the agent page anywhere with /realtor, or through the OpenRealtor export from a radial menu or a tablet. With Job.OnDuty = true they must be on duty.
To sell a house:
- The client stands within
Job.Reachmetres of the realtor. - The realtor picks a house and a price within
Job.PriceRangeof its list price (90 % to 125 % by default). - The client sees the house and the offer on their own screen and has
Job.OfferTimeseconds to buy it or turn it down. - When the client buys, the realtor is paid
Job.Commissionof the price.
The server raises the event sd-housing:server:realtorSale on every realtor sale. See Events.
The Agency Tab
With Agency.Enabled = true realtors have an Agency tab on their page. The houses nobody owns are the agency's stock. Every sale goes in its ledger: what the house was listed at, what it went for and who sold it.
- Every realtor sees the stock, the sales and the team.
- Job grade
Agency.ManageGradeand above set a house's list price (betweenMinPriceandMaxPrice), put it on the market or hold it back, feature it and write its remarks. - With
Agency.Society = truewhat a buyer pays, less the realtor's commission, goes into the job's society account. The account is found automatically from Renewed-Banking, qb-banking, qb-management or esx_addonaccount. Withfalsethe money leaves the economy.
Browsing Anywhere
With Anywhere = true anyone may open the listings anywhere with the command or the export. Buying still follows the Buy settings.
Listing Photos
Listing photos are taken in game by an admin, from the admin panel:
- The Properties tab photographs every listing, or only the ones without a photo.
- A property's drawer photographs that one house, or takes what the admin sees with From where I stand.
The camera finds the front of the house from the street by itself, sets the hour and weather from Photos on that client only, and keeps other peds out of the picture. Photos are saved in the database table sd_housing_photos.
Selling and Giving Away
From the property page or the home panel, an owner can:
- Sell to the market for
Properties.SellBackof the price (60 % by default).SellBack = 0turns selling off. What happens to the decor is set byDecor.OnSale:'refund'removes it and pays the refund share to the seller,'keep'leaves it for the next owner,'clear'removes it with nothing back. - Give it away to another player.
Letters and parcels go with the household when a house changes hands. The mailbox stays with the house.
Configuration
configs/shared/realtor.lua:
| Option | Default | Description |
|---|---|---|
Name | 'Dynasty 8' | The agency's name, on the page and the office blip. |
Buy.Door | true | Players may buy at the house's porch. |
Buy.Office | true | Players may buy at the agency desk. |
Buy.OnlyWhenNoAgents | true | Players buy by themselves only while no realtor is on duty. |
Office.Enabled | true | The agency desk. |
Office.Locations | one vec4 | Where each desk's agent stands. |
Office.Model | 'cs_debra' | The agent ped. |
Office.Scenario | 'WORLD_HUMAN_CLIPBOARD' | What the agent does while waiting. false stands. |
Office.Distance | 2.2 | Metres from the ped the prompt shows. |
Office.Blip | { Sprite = 374, Color = 2, Scale = 0.8 } | false is no blip. |
Job.Enabled | true | Player realtors. |
Job.Jobs | { realestate = 0 } | Job name and lowest grade. |
Job.OnDuty | true | Only while on duty. |
Job.Commission | 0.10 | The realtor's share of the price. |
Job.PriceRange | { 0.90, 1.25 } | What a realtor may ask, as a share of the list price. |
Job.Reach | 6.0 | Metres the client may stand from the realtor. |
Job.OfferTime | 90 | Seconds the client has to answer. |
Agency.Enabled | true | The realtors' Agency tab. |
Agency.ManageGrade | 3 | The lowest job grade that runs the agency. |
Agency.Society | true | Sales are paid into the job's society account. |
Agency.Job | nil | The job whose society gets a sale made without a realtor. nil is the first of Job.Jobs. |
Agency.MinPrice / Agency.MaxPrice | 1000 / 50000000 | Limits for a list price. |
Command | 'realtor' | Opens the agent page. false is no command. |
Anywhere | false | Anyone may browse the listings anywhere. |
Photos.Hour, Photos.Weather, Photos.Fov | 17, 'EXTRASUNNY', 50.0 | How listing photos are taken. |
See the full file.
