Agency Docs
QBESXStandalone

Agency-Housing Installation

Système de logements basé sur une base de données pour FiveM.

v1.1.0Payant5 Pages

01Installation

  1. 1Extrayez Agency-Housing dans votre dossier resources
  2. 2Installez PolyZone si vous ne l'avez pas encore
  3. 3Ajoutez ensure PolyZone et ensure Agency-Housing dans server.cfg, après oxmysql
  4. 4Démarrez le serveur : les tables de la base de données sont créées au premier démarrage
  5. 5Vérifiez la console : elle indique le framework détecté ou affiche Running standalone
  6. 6Facultatif : add_ace group.admin agency.housing allow donne accès au créateur
  7. 7Standalone : renseignez Config.Standalone pour l'argent et les admins (voir la page config)
  8. 8Mise à jour depuis la 1.0 : remplace tout le dossier, reporte tes valeurs dans le nouveau config.lua et redémarre la ressource une fois, la base de données se met à jour toute seule.
  9. 9Après une mise à jour, exécute une fois /ahousethumbs en tant qu'admin pour créer les images des nouveaux meubles.

02Dépendances

  • oxmysql (requis)
  • PolyZone (requis, les limites de terrain en dépendent)
  • QBCore, QBox ou ESX (facultatif, fonctionne en standalone sans framework)
  • Un inventaire pour le stockage (facultatif : ox_inventory, qb-inventory, qs, ps, lj ou jpr)
  • illenium-appearance ou qb-clothing (facultatif, sinon la garde-robe intégrée est utilisée)
  • Un script de garage (facultatif : Agency-Garage, jg-advancedgarages ou qb-garages, détecté automatiquement)
  • Un téléphone pour l'application Housing (facultatif : Agency Phone, Agency Pad, lb-phone ou qs-smartphone-pro)

03Fichier SQL

Optionnel : la ressource crée ces tables elle-même au démarrage. N'importez ce fichier que si vous préparez la base de données à la main :

-- ===================================================== -- Agency Housing: database tables -- ===================================================== -- -- Optional. Agency-Housing creates all of these on start and adds any column an -- older database is missing, so a fresh server needs no import. Run this by -- hand only if your database user is not allowed to create tables. -- -- Safe to run more than once: CREATE TABLE IF NOT EXISTS leaves an existing -- table and its data alone. Works on MariaDB and MySQL 8. -- -- If you changed Config.TableName, change `agency_houses` below to match. -- Houses, their owners, keys and everything placed in them. CREATE TABLE IF NOT EXISTS `agency_houses` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(100) NOT NULL, `shell` VARCHAR(64) NOT NULL, `price` INT NOT NULL DEFAULT 0, `entrance` LONGTEXT NOT NULL, `interior` LONGTEXT DEFAULT NULL, `owner` VARCHAR(80) DEFAULT NULL, `owner_name` VARCHAR(100) DEFAULT NULL, `locked` TINYINT(1) NOT NULL DEFAULT 1, `for_sale` TINYINT(1) NOT NULL DEFAULT 1, `show_blip` TINYINT(1) NOT NULL DEFAULT 1, `keys` LONGTEXT DEFAULT NULL, `created_by` VARCHAR(100) DEFAULT NULL, `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `garage` LONGTEXT DEFAULT NULL, `exit_point` LONGTEXT DEFAULT NULL, `stash_point` LONGTEXT DEFAULT NULL, `wardrobe_point` LONGTEXT DEFAULT NULL, `zone` LONGTEXT DEFAULT NULL, `kind` VARCHAR(16) NOT NULL DEFAULT 'interior', `furniture` LONGTEXT DEFAULT NULL, `upgrades` LONGTEXT DEFAULT NULL, `cameras` LONGTEXT DEFAULT NULL, `doors` LONGTEXT DEFAULT NULL, `blip` LONGTEXT DEFAULT NULL, PRIMARY KEY (`id`), KEY `owner` (`owner`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- Who disconnected inside which house, so they are put back on rejoin. CREATE TABLE IF NOT EXISTS `agency_house_inside` ( `identifier` VARCHAR(80) NOT NULL, `house_id` INT NOT NULL, `since` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`identifier`), KEY `house_id` (`house_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- Outfits of the built-in wardrobe. CREATE TABLE IF NOT EXISTS `agency_house_outfits` ( `id` INT NOT NULL AUTO_INCREMENT, `identifier` VARCHAR(80) NOT NULL, `name` VARCHAR(40) NOT NULL, `model` INT NOT NULL, `data` LONGTEXT NOT NULL, `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `identifier` (`identifier`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- Agency Companion app: this server's id and the linked phones. CREATE TABLE IF NOT EXISTS `agency_housing_cmp_meta` ( `k` VARCHAR(64) NOT NULL PRIMARY KEY, `v` TEXT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `agency_housing_cmp_devices` ( `id` INT NOT NULL AUTO_INCREMENT, `identifier` VARCHAR(60) NOT NULL, `player_name` VARCHAR(80) DEFAULT NULL, `token_hash` CHAR(64) NOT NULL, `device_name` VARCHAR(64) DEFAULT NULL, `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `last_seen` TIMESTAMP NULL DEFAULT NULL, `revoked` TINYINT(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE KEY `token_hash` (`token_hash`), KEY `identifier` (`identifier`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

Toujours bloqué après cette page ? Notre support prend le relais.