Agency Docs
QBESXStandalone

Agency-Lifeinvader V3 Installation

The ad agency of the city for FiveM on QBCore, Qbox, ESX or fully standalone.

v3.2.1Paid5 Pages

01Installation

  1. 1Put Agency-LifeinvaderV3 into your resources folder
  2. 2Add ensure Agency-LifeinvaderV3 to server.cfg, after your framework, oxmysql and Agency Phone or Agency Pad
  3. 3Give your admins access with add_ace group.admin agency.lifeinvader.admin allow, or use Config.Admin
  4. 4With oxmysql the tables are created on the first start. install/agency_lifeinvader.sql is only for servers that create tables by hand
  5. 5Updating from an older version: replace the folder and take the new config.lua. Ads, drafts and player settings stay, the tables are upgraded in place

02Dependencies

  • No dependency required
  • QBCore, Qbox or ESX (optional, runs standalone without one)
  • oxmysql (optional, without it everything is saved in the server's key value store)
  • Agency Phone or Agency Pad 27.0.2 or newer (optional, for the app and Agency Pay)
  • Agency Banking (optional, money on standalone servers)
  • Agency-Notify (optional, messages in the Agency style)

03SQL File

Optional: the resource creates these tables on its own when it starts. Import this file only if you set up the database by hand:

-- ============================================================================= -- Agency Lifeinvader 3.2: database tables (OPTIONAL) -- ----------------------------------------------------------------------------- -- You do not need to run this file. With oxmysql the script creates these -- tables on the first start and upgrades the tables of Lifeinvader V2 and V3 -- in place. Run it only if your server creates tables by hand. -- ============================================================================= CREATE TABLE IF NOT EXISTS `lifeinvader_ads` ( `id` INT NOT NULL AUTO_INCREMENT, `identifier` VARCHAR(100) NOT NULL, `author_name` VARCHAR(100) DEFAULT NULL, `message` TEXT NOT NULL, `category` VARCHAR(50) DEFAULT 'other', `anonymous` TINYINT DEFAULT 0, `boosted` TINYINT DEFAULT 0, `repetitions_total` INT DEFAULT 1, `repetitions_left` INT DEFAULT 1, `interval_seconds` INT DEFAULT 60, `display_duration` INT DEFAULT 8, `status` VARCHAR(16) NULL DEFAULT 'active', `approved` TINYINT DEFAULT 1, `approved_by` VARCHAR(100) DEFAULT NULL, `rejected_reason` TEXT DEFAULT NULL, `next_send_time` DATETIME DEFAULT NULL, `scheduled_for` DATETIME DEFAULT NULL, `review_requested_at` DATETIME DEFAULT NULL, `reviewed_at` DATETIME DEFAULT NULL, `review_decision` VARCHAR(32) DEFAULT NULL, `queue_priority` INT DEFAULT 0, `ai_score` INT DEFAULT 0, `ai_flags` LONGTEXT DEFAULT NULL, `admin_notes` LONGTEXT DEFAULT NULL, `price_paid` INT DEFAULT NULL, `paid_with` VARCHAR(16) DEFAULT NULL, `refunded` INT DEFAULT 0, `reviewer` VARCHAR(100) DEFAULT NULL, `sent_count` INT DEFAULT 0, `last_sent_at` DATETIME DEFAULT NULL, `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP, `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `idx_identifier` (`identifier`), KEY `idx_status` (`status`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `lifeinvader_ad_drafts` ( `id` INT NOT NULL AUTO_INCREMENT, `identifier` VARCHAR(100) NOT NULL, `title` VARCHAR(120) DEFAULT NULL, `message` TEXT NOT NULL, `category` VARCHAR(50) DEFAULT 'other', `anonymous` TINYINT DEFAULT 0, `boosted` TINYINT DEFAULT 0, `repetitions_total` INT DEFAULT 1, `interval_seconds` INT DEFAULT 60, `display_duration` INT DEFAULT 8, `delay` INT DEFAULT 0, `scheduled_for` DATETIME DEFAULT NULL, `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP, `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `idx_identifier` (`identifier`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `lifeinvader_player_settings` ( `id` INT NOT NULL AUTO_INCREMENT, `identifier` VARCHAR(100) NOT NULL, `notification_position` VARCHAR(20) DEFAULT 'middle-left', `notification_enabled` TINYINT DEFAULT 1, `notification_scale` FLOAT DEFAULT 1.0, `ui_transparency` FLOAT DEFAULT 0.55, `accent_color` VARCHAR(20) DEFAULT NULL, `sound_enabled` TINYINT DEFAULT 1, `admin_panel_scale` FLOAT DEFAULT 1.0, `muted_categories` VARCHAR(255) DEFAULT NULL, `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP, `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `uniq_identifier` (`identifier`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `lifeinvader_admin_logs` ( `id` INT NOT NULL AUTO_INCREMENT, `admin_identifier` VARCHAR(100) DEFAULT NULL, `admin_name` VARCHAR(100) DEFAULT NULL, `action` VARCHAR(64) NOT NULL, `ad_id` INT DEFAULT NULL, `metadata` LONGTEXT DEFAULT NULL, `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `idx_action` (`action`), KEY `idx_ad_id` (`ad_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

+Good to know

Lifeinvader needs no other resource. Put it in, start it after your framework and give your admins access. Tables, the device app and the payment methods set themselves up.

Start Order
ensure Agency-LifeinvaderV3 goes after your framework, oxmysql and Agency Phone or Agency Pad in server.cfg, so the script finds them on start.
Admins
add_ace group.admin agency.lifeinvader.admin allow gives your admins the Admin panel. Config.Admin also takes framework groups and single identifiers.
The Agency Job
Staff are players with the job lifeinvader of your framework (Config.Agency.job): from grade 0 they open the staff panel, from grade 3 they pay money out. Standalone servers use the ACE agency.lifeinvader.staff.
Database
With oxmysql the tables lifeinvader_ads, lifeinvader_ad_drafts, lifeinvader_player_settings and lifeinvader_admin_logs are created on the first start and upgraded from V2 and V3 in place. install/agency_lifeinvader.sql is only for servers that create tables by hand.

?Frequently asked questions

Do I have to import the SQL file?

No. It is only for servers that create tables by hand. With oxmysql the script creates and upgrades its tables by itself.

How do I update from V3?

Stop the server, keep a copy of the old folder, replace it with the new one and take the new config.lua, because many options are new. Ads, drafts and player settings stay.

Still stuck after this page? Our support team takes it from here.