Houses, ranches and businesses with real keys, lockable doors, storage and taxes

tr-properties is the shared base for anything players can own: houses, ranches, businesses. It handles who owns what, the doors and keys, storage, map blips and property taxes. Other scripts (tr-housing, tr-ranching, tr-government) plug into it for everything else.

Works on any framework jo_libs supports. Reading the keys in a player's pockets is the one inventory-specific part, and it's a single function in the config.

How it works

Every property is an entry in the config: a name, a price, its doors, and optionally storage and a blip.

  • Buying. Walking up to an unowned property shows a Buy prompt with its price (or it's sold through another script, such as tr-government's office). The buyer gets a key.
  • Keys. Keys are real items. Using one at a door locks or unlocks it, but only if that key fits the current lock. Keys can be copied, stolen and lost; changing the locks makes every old key useless.
  • Doors. Each door listed for a property has its own lock. Interior doors you leave out aren't touched.
  • Lockpicking. A lockpick opens (or locks) a single door, or a storage, with a minigame. No key needed.
  • Storage. A property can have a stash, opened by anyone carrying a key that fits.
  • Taxes. Owners are charged weekly. A property whose owner can't pay goes back on the market.

Everything is checked on the server: who's standing where, which key fits, who's allowed in.

Requirements

  • jo_libs
  • oxmysql
  • A framework and inventory supported by jo_libs (VORP, RSG, RedEM:RP, ...)