Installation

Follow these steps to install ActivityManager on your FiveM server.

Step 1: Download & Extract

  1. Download the activitymanager resource from your purchase.
  2. Extract the folder into your server's resources directory.
  3. Rename the folder to activitymanager (remove any version numbers).

Step 2: Database Setup

Import the SQL file to create the required tables:

-- Run this in your MySQL database
-- File: activitymanager_zones.sql

CREATE TABLE IF NOT EXISTS `activitymanager_zones` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `name` VARCHAR(100) NOT NULL,
  `job_name` VARCHAR(50) NOT NULL,
  `coords_x` FLOAT NOT NULL,
  `coords_y` FLOAT NOT NULL,
  `coords_z` FLOAT NOT NULL,
  `radius` FLOAT DEFAULT 5.0,
  `enabled` TINYINT(1) DEFAULT 1,
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS `activitymanager_guilds` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `guild_id` VARCHAR(20) NOT NULL,
  `guild_name` VARCHAR(100) NOT NULL,
  `job_name` VARCHAR(50) NOT NULL,
  `billing_system` VARCHAR(50) DEFAULT 'okokBilling',
  `billing_table` VARCHAR(100) DEFAULT 'okokbanking_transactions',
  `enabled` TINYINT(1) DEFAULT 1,
  UNIQUE KEY `unique_guild` (`guild_id`)
);

Step 3: Server Configuration

Add the resource to your server.cfg:

# Ensure your database resource starts first
ensure oxmysql

# Start ActivityManager
ensure activitymanager

Step 4: IP Whitelist

Important: Your server IP must be whitelisted to communicate with the ActivityManager API. Open a ticket on Discord with your server IP address.

Step 5: Discord Bot Setup

  1. Invite the ActivityManager bot to your Discord server from activitymanager.it.
  2. Configure the bot using the dashboard.
  3. Check out the guide here ActivityManager The Complete Guide (Dubbed).
  4. Link your Discord guild to a job using /ampanel command.

Step 6: Admin Panel Access

Configure admin permissions in config.lua and use:

/ampanel  -- Opens the in-game admin panel to manage zones

Verify Installation

Check your server console for:

[ActivityManager] Sistema inizializzato correttamente!
[ActivityManager] Guild MyServer: API connessa (Premium: true)