QBESXStandalone
Agency-Housing Installation
Datenbankgestütztes Haussystem für FiveM, das ESX, QBCore und QBox selbst erkennt.
v1.79.0Bezahlt5 Seiten

01Installation
- 1sql/install.sql in deine Datenbank importieren
- 2Extract Agency-Housing into your resources folder
- 3Install PolyZone if you do not have it yet
- 4Add ensure PolyZone and ensure Agency-Housing to server.cfg, after oxmysql
- 5Optional: add_ace group.admin agency.housing allow to grant creator access
02Abhängigkeiten
oxmysql (erforderlich)PolyZone (required, property borders are built from it)ESX / QBCore / QBox (optional, runs standalone with ACE permissions)
03SQL Datei
Importiere diese SQL-Datei in deine Datenbank bevor du die Ressource startest:
-- =====================================================================
-- Agency Housing - Database
--
-- Two tables. `agency_houses` holds the houses themselves, one row each.
-- `agency_house_inside` remembers who was inside which house, so a player
-- who disconnects indoors is put back where they were on the next join
-- instead of on the pavement outside.
--
-- The resource adds later columns by itself on every start
-- (ALTER TABLE ... ADD COLUMN IF NOT EXISTS), so an existing install only
-- ever needs the two CREATE statements below. Running this file twice is
-- harmless: every statement is IF NOT EXISTS.
--
-- The table name follows Config.TableName. Rename it here too if you
-- change it there.
-- =====================================================================
CREATE TABLE IF NOT EXISTS `agency_houses` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
-- What the house is and what it costs.
`name` VARCHAR(64) NOT NULL,
`shell` VARCHAR(64) DEFAULT NULL,
-- interior | shell | mlo. Decides whether the house is entered through a
-- marker or walked into through its own front door.
`kind` VARCHAR(16) NOT NULL DEFAULT interior,
`price` INT NOT NULL DEFAULT 0,
-- Positions, each stored as JSON. `interior` is only set when the house
-- carries its own recorded coordinates; otherwise the shell entry in
-- config.lua applies.
`entrance` LONGTEXT DEFAULT NULL,
`interior` LONGTEXT DEFAULT NULL,
`exit_point` LONGTEXT DEFAULT NULL,
`stash_point` LONGTEXT DEFAULT NULL,
`wardrobe_point` LONGTEXT DEFAULT NULL,
`garage` LONGTEXT DEFAULT NULL,
-- The property border: the corners walked in the creator, handed to
-- PolyZone on start. Required for houses created since borders exist.
`zone` LONGTEXT DEFAULT NULL,
-- The MLO doors this house owns, for kind = mlo.
`doors` LONGTEXT DEFAULT NULL,
-- Per-house map blip override: {"name":"Villa","color":5,"scale":0.9}
-- Any field may be absent; what is missing follows the state styles in
-- Config.Blips (for sale / owned / keyholder).
`blip` LONGTEXT DEFAULT NULL,
-- Ownership. `owner` is the framework identifier, NULL while the house
-- is unsold.
`owner` VARCHAR(64) DEFAULT NULL,
`owner_name` VARCHAR(64) DEFAULT NULL,
`keys` LONGTEXT DEFAULT NULL,
-- State flags.
`locked` TINYINT(1) NOT NULL DEFAULT 1,
`for_sale` TINYINT(1) NOT NULL DEFAULT 1,
`show_blip` TINYINT(1) NOT NULL DEFAULT 1,
-- What the owner did with the place.
`furniture` LONGTEXT DEFAULT NULL,
`upgrades` LONGTEXT DEFAULT NULL,
`cameras` LONGTEXT DEFAULT NULL,
`created_by` VARCHAR(64) DEFAULT NULL,
INDEX `owner` (`owner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Who is inside which house. One row per player at most, hence the
-- identifier as primary key: the resource writes with ON DUPLICATE KEY.
CREATE TABLE IF NOT EXISTS `agency_house_inside` (
`identifier` VARCHAR(64) NOT NULL PRIMARY KEY,
`house_id` INT NOT NULL,
`since` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
INDEX `house_id` (`house_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;