Skip to content

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 ​

WaySettingHow it works
At the doorBuy.DoorThe porch prompt of a house for sale opens its listing.
At the agencyBuy.OfficeA ped at a desk, with a blip. Anyone looks through the listings and buys there.
From a realtorJob.EnabledA 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:

  1. The client stands within Job.Reach metres of the realtor.
  2. The realtor picks a house and a price within Job.PriceRange of its list price (90 % to 125 % by default).
  3. The client sees the house and the offer on their own screen and has Job.OfferTime seconds to buy it or turn it down.
  4. When the client buys, the realtor is paid Job.Commission of 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.ManageGrade and above set a house's list price (between MinPrice and MaxPrice), put it on the market or hold it back, feature it and write its remarks.
  • With Agency.Society = true what 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. With false the 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.SellBack of the price (60 % by default). SellBack = 0 turns selling off. What happens to the decor is set by Decor.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:

OptionDefaultDescription
Name'Dynasty 8'The agency's name, on the page and the office blip.
Buy.DoortruePlayers may buy at the house's porch.
Buy.OfficetruePlayers may buy at the agency desk.
Buy.OnlyWhenNoAgentstruePlayers buy by themselves only while no realtor is on duty.
Office.EnabledtrueThe agency desk.
Office.Locationsone vec4Where 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.Distance2.2Metres from the ped the prompt shows.
Office.Blip{ Sprite = 374, Color = 2, Scale = 0.8 }false is no blip.
Job.EnabledtruePlayer realtors.
Job.Jobs{ realestate = 0 }Job name and lowest grade.
Job.OnDutytrueOnly while on duty.
Job.Commission0.10The 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.Reach6.0Metres the client may stand from the realtor.
Job.OfferTime90Seconds the client has to answer.
Agency.EnabledtrueThe realtors' Agency tab.
Agency.ManageGrade3The lowest job grade that runs the agency.
Agency.SocietytrueSales are paid into the job's society account.
Agency.JobnilThe job whose society gets a sale made without a realtor. nil is the first of Job.Jobs.
Agency.MinPrice / Agency.MaxPrice1000 / 50000000Limits for a list price.
Command'realtor'Opens the agent page. false is no command.
AnywherefalseAnyone may browse the listings anywhere.
Photos.Hour, Photos.Weather, Photos.Fov17, 'EXTRASUNNY', 50.0How listing photos are taken.

See the full file.