Agency-Lifeinvader V3 Instalação
A agência de publicidade da cidade para FiveM em QBCore, Qbox, ESX ou totalmente independente.

01Instalação
- 1Coloque Agency-LifeinvaderV3 na pasta resources
- 2Adicione ensure Agency-LifeinvaderV3 ao server.cfg, depois do seu framework, oxmysql e Agency Phone ou Agency Pad
- 3Dê acesso aos seus administradores com add_ace group.admin agency.lifeinvader.admin allow ou use Config.Admin
- 4Com oxmysql, as tabelas são criadas na primeira inicialização. install/agency_lifeinvader.sql destina-se apenas a servidores que criam as tabelas manualmente
- 5Atualização de uma versão mais antiga: substitua a pasta e use o novo config.lua. Os anúncios, rascunhos e as configurações dos jogadores são mantidos, as tabelas são atualizadas no local
02Dependências
Não é necessária nenhuma dependênciaQBCore, Qbox ou ESX (opcional, funciona em standalone sem nenhum deles)oxmysql (opcional, sem ele tudo é guardado no armazenamento chave-valor do servidor)Agency Phone ou Agency Pad 27.0.2 ou mais recente (opcional, para a app e Agency Pay)Agency Banking (opcional, dinheiro em servidores standalone)Agency-Notify (opcional, mensagens ao estilo Agency)
03Arquivo SQL
Opcional: o recurso cria estas tabelas sozinho ao iniciar. Importe este arquivo só se você preparar o banco de dados manualmente:
-- =============================================================================
-- 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;
+Bom saber
O Lifeinvader não precisa de nenhum outro recurso. Instale-o, inicie-o depois do seu framework e conceda acesso aos seus admins. As tabelas, o app do dispositivo e os métodos de pagamento são configurados automaticamente.
- Ordem de inicialização
- ensure Agency-LifeinvaderV3 deve vir depois do seu framework, oxmysql e Agency Phone ou Agency Pad em server.cfg, para que o script os encontre ao iniciar.
- Admins
- add_ace group.admin agency.lifeinvader.admin allow concede aos seus admins acesso ao painel Admin. Config.Admin também aceita grupos do framework e identificadores individuais.
- O emprego Agency
- A equipe é composta por jogadores com o emprego lifeinvader do seu framework (Config.Agency.job): a partir do grade 0, eles podem abrir o painel da equipe; a partir do grade 3, podem pagar valores. Servidores standalone usam o ACE agency.lifeinvader.staff.
- Banco de dados
- Com oxmysql, as tabelas lifeinvader_ads, lifeinvader_ad_drafts, lifeinvader_player_settings e lifeinvader_admin_logs são criadas na primeira inicialização e atualizadas no lugar a partir da V2 e da V3. install/agency_lifeinvader.sql é apenas para servidores que criam tabelas manualmente.
?Perguntas frequentes
Preciso importar o arquivo SQL?
Não. É apenas para servidores que criam tabelas manualmente. Com oxmysql, o script cria e atualiza as próprias tabelas.
Como faço para atualizar da V3?
Pare o servidor, mantenha uma cópia da pasta antiga, substitua-a pela nova e use o novo config.lua, pois muitas opções são novas. Os anúncios, rascunhos e as configurações dos jogadores são mantidos.