Skip to content

Full Config: Realtor ​

The complete configs/shared/realtor.lua for Advanced Housing (sd-housing): where players may buy, the agency desk, the realtor job, the agency page and listing photos.

TIP

See the configuration guide for what each file controls. Download this file as a reference, and merge changes with the config shipped in your installed version.

Download shared/realtor.lua

lua
-- The realtor: every house for sale on one page - its photo, its floor plan, how big it is, where it is on the map of
-- San Andreas - with the way there (a GPS route), a look at it from the street, and buying it. Two ways in, each on or
-- off: the agency (a ped at a desk anyone walks up to and looks through the listings with) and realtors (players with
-- a job, who sell a house to the client beside them at a price they agree, and are paid a commission on it).
return {
    Name = 'Dynasty 8', -- the agency, at the top of the page and on the office's blip

    -- Where a player may buy a house by themselves, without a realtor. Both off: only realtors sell houses.
    Buy = {
        Door = true, -- at the house's own porch (it opens the house's listing)
        Office = true, -- at the agency's desk
        -- true: only while no realtor is on duty. With one on, they are who sells houses; with none, nobody is left
        -- unable to buy a home.
        OnlyWhenNoAgents = true,
    },

    -- The agency: a ped at a desk where anyone looks through every house for sale.
    Office = {
        Enabled = true,
        -- Where each desk's agent stands (as /coords reads a ped: x, y, z, heading). The map has no Dynasty 8 office of
        -- its own; put it in your agency's MLO if you have one.
        Locations = {
            vec4(-703.5, 256.8, 80.59, 185.0), -- in front of the offices on West Eclipse Blvd, West Vinewood
        },
        Model = 'cs_debra', -- the agent at the desk
        Scenario = 'WORLD_HUMAN_CLIPBOARD', -- what they do while they wait (false: stand)
        Distance = 2.2, -- metres from the ped the prompt shows (or the target option reaches)
        Blip = { Sprite = 374, Color = 2, Scale = 0.8 }, -- false: no blip
    },

    -- Realtors: players with one of these jobs (name = lowest grade) open the agent page anywhere - with the command, or
    -- exports['sd-housing']:OpenRealtor() from a radial or a tablet - and sell a house to the player beside them: the
    -- client sees the house on their own screen with the offer, and buys it or turns it down.
    Job = {
        Enabled = true,
        Jobs = { realestate = 0 },
        OnDuty = true, -- only while on duty
        Commission = 0.10, -- the realtor's share of the price, paid into their account when the client buys
        PriceRange = { 0.90, 1.25 }, -- what a realtor may ask: from 90 % to 125 % of the list price
        Reach = 6.0, -- metres the client may stand from the realtor
        OfferTime = 90, -- seconds the client has to answer
    },

    -- The agency: the realtors' own page (the Agency tab of theirs). The houses nobody owns are its stock; every sale
    -- goes in its ledger - what it was listed at, what it went for, who sold it - and its figures are of that.
    Agency = {
        Enabled = true,
        -- The lowest job grade that runs it: sets a house's list price, puts it on the market or holds it back, features
        -- it and writes its remarks. Every realtor sees the stock, the sales and the team.
        ManageGrade = 3,
        -- What a buyer pays, less the realtor's commission, goes into the job's society account - found by itself:
        -- Renewed-Banking, qb-banking, qb-management or esx_addonaccount. false: it leaves the economy, as before.
        Society = true,
        Job = nil, -- the job whose society a sale made without a realtor goes to (nil: the first of Job.Jobs)
        MinPrice = 1000, -- what a list price may be set between
        MaxPrice = 50000000,
    },

    Command = 'realtor', -- opens the agent page for a realtor; for anyone else only with Anywhere. false = no command
    Anywhere = false, -- true: anyone may look through the listings anywhere (command, export); buying is still as Buy says

    -- Every listing's photo is taken in the game by an admin: the admin panel's Properties tab, or a property's drawer.
    -- The camera finds the house's front from the street by itself and takes it at this hour, under this weather.
    Photos = {
        Hour = 17, -- 0-23
        Weather = 'EXTRASUNNY',
        Fov = 50.0,
    },
}