Properties & Homes
A property is a home a player can own: a house, a flat, a studio. Server owners set them up in game; your resource reads them and sets owners and keys with the Properties API.
Templates, units and properties
- Template: one per interior (MLO archetype), such as a half-floor of Mega Tower B.
- Unit: one home inside that interior (its space, doors, signs, garage), measured from the interior's origin: flat 5 of the four on that half-floor.
- Property: one unit at one place the interior stands in the world: B805.
Every copy of an interior shares its units: set up one Mega floor's four flats and the other 35 floors are a button each.
Setting one upServer owners#
Stand inside the MLO and open /whip → World → Properties → New property, then step through Interior, Space, Doors, Signs, Garage, Name & settings and Review; nothing is saved until Save. Entrance and garage doors lock to the owner and keyholders; an inner door locks only if you say so. Until a manager sign is placed inside, Keys stand at the outside sign and Furnish isn't offered (the owner can type /furnish in the home).
A whole buildingServer owners#
Register here, in another copy of a templated interior, registers its free units from a name pattern: {b} building, {u} / {k} unit label / key, {f} floor, {n} / {nn} a number counting up from the start number. B{f}{nn} on floor 8 from 5 gives B805 to B808. Stamp mode flies you through the building: E registers the copy you're in, PgUp / PgDn change floor, Tab / Q change the block of numbers, Esc is done.
Checking themServer owners#
Verify takes you to each property and checks its interior, position, rooms, doorways and doors; Quick check re-checks on the server without moving you. A property's status is ok, unverified (never checked, or changed since) or attention (with a reason).
Buying and owning
- Buying. A priced property is sold at its outside sign, for cash or from any account the buyer can pay from (their own, or a shared or job account with withdraw access). Price
0means not for sale: only an admin, orSetPropertyOwner, hands it over. - Doors are managed doors that open for the owner and keyholders; unowned, for nobody.
- Keys are given face to face at the manager sign, within
Config.PropertyKeyGrantRange. A new owner takes every key back. - Furniture and the theme are chosen at the manager sign. A sale keeps the theme.
- Private garage. A unit with bays gives each property a garage only the owner and keyholders see, with no blip;
GetNearestGaragenever returns it. Lose access and your cars inside move to the nearest public garage.
Stashes#
Furniture listed in Config.PropertyStashProps becomes a stash once placed. Only the owner and keyholders can open it; admins open any from /whip → Economy → Containers.
-- config.lua: model = { label, slots, most kg }
Config.PropertyStashProps = {
['v_res_tre_wardrobe'] = { label = 'Wardrobe', slots = 40, weight = 150.0 },
['prop_ld_int_safe_01'] = { label = 'Safe', slots = 10, weight = 40.0 },
}- It moves with its furniture, contents and all, and passes to a new owner full.
- A save or Clear that would remove a stash with anything in it is refused.
- Deleting the property deletes its stashes, logging the contents as lost.
- At most
Config.PropertyStashLimitper property; lowering it takes none away.
Interior themes#
An interior resource can give its homes several looks (one entity set each) with whip_interior_themes 'v1' in its fxmanifest.lua and four server exports, read when either resource starts. A property whose interior and origin match a home's within 2 m gets a Theme option on its sign.
| Your export | What it returns or does |
|---|---|
GetThemes() | { { id = 0, name = 'Original', walls = '#rrggbb', trim = '#rrggbb', floor = '#rrggbb' }, ... }: ids 0 to 255, 0 the default; the colours are the swatch |
GetHomes() | { { key, archetype, designArchetype?, position }, ... }: archetype name and instance origin. designArchetype is the interior a replaced home used to place |
SetAllThemes(map) | { [key] = themeId }, every home (one left out is 0), sent when either resource starts |
SetHomeTheme(key, themeId) | One home changed. Return true, or false, why |
Your client draws the look: switch the entity set before a fresh interior is ready, or on one already showing, refresh it and tell WHIP to remake the furniture:
ActivateInteriorEntitySet(interiorId, 'wh_theme_2')
RefreshInterior(interiorId)
TriggerEvent('whip_core:interiorRefreshed', interiorId)Shipping it with an MLOServer owners#
Templates & packs → Export writes an interior and its copies as whip_properties.lua. Put it in the MLO's resource with whip_property_pack 'whip_properties.lua' in the manifest, and every server running the MLO gets its homes. The format is in whip_core/docs/properties.md.
Config
| Config | Default | What it does |
|---|---|---|
PropertyMaxObjects | 150 | Furniture limit, unless the property says otherwise |
PropertyKeyGrantRange | 5.0 | How close someone must be to be handed a key |
PropertyStreamRange | 60.0 | How close a sign appears from |
PropertyFurnitureDistance | 20.0 | How close to the walls furniture appears (it goes 2 m further out). 0 = only inside |
PropertyFurnitureRooms | 4 | Properties furnished at once: yours, then the nearest |
PropertySignPlaceRange | 12.0 | How far an admin can aim a sign from |
PropertyStashProps | 4 pieces | Furniture that becomes a stash |
PropertyStashLimit | 6 | Most stashes per property |