🎯Missions

A dynamic and modular quest/mission system for FiveM. Easily create multi-stage quests with progress indicators, categorize them, and control visibility (globally or player-specific). Fully scriptable via exports.

πŸ›’ Tebex: pyrobyte.tebex.io/package/6784749


βš™οΈ Features

  • βœ… Multiple quest categories (Main, Side, Events, Faction)

  • πŸ“ Multi-stage quest support

  • πŸ“Š Visual progress tracking

  • πŸ“Œ Pinned quest UI for quick info

  • 🧩 Fully integrated exports for script compatibility

  • πŸ‘€ Global or per-player quest visibility


πŸš€ Installation

Requirements

Setup Steps

  1. Download and extract pyro-Missions into your resources/ folder.

  2. Ensure ox_lib is installed and listed before pyro-Missions in your server config.

ensure ox_lib
ensure pyro-Missions
  1. Start or restart the server.


βš™οΈ Configuration

All configuration is in Config.lua.

Command & Keybind

Config.MenuCommand = "quests" -- Type /quests
Config.MenuKey = {
  key = 'F3',
  label = 'Open Quest Menu'
}

Locale & UI

Config.Locale = "en" -- Localization system
Config.ActiveQuestsPosition = {
  top = 200,        -- px from screen top
  side = "right"    -- or "left"
}
Config.MaxPinnedQuests = 2 -- Max visible quests on screen

Categories

Define custom quest categories and their display order:

Config.Categories = {
  { id = "primary", name = "Primary", index = 0 },
  { id = "side", name = "Secondary", index = 1 },
  { id = "world", name = "Events", index = 2 },
  { id = "faction", name = "Faction", index = 3 }
}

πŸ”’ index controls UI order in the menu.


πŸ”§ Export Reference

You can control quests dynamically through Lua using the following exports.

πŸ“₯ AddQuest

Adds a quest to the system. Can be global or player-specific.

exports['pyro-Missions']:AddQuest(
  questId,        -- string
  categoryId,     -- string (must match a category in config)
  questName,      -- string
  questDescription, -- string
  playerId        -- number (optional)
)

Leave out playerId to make it global.


πŸ—‘ RemoveQuest

Removes a quest for all players or a specific player.

exports['pyro-Missions']:RemoveQuest(
  questId,       -- string
  playerId       -- number (optional)
)

πŸ›  UpdateQuest

Changes the quest’s name, description, or category.

exports['pyro-Missions']:UpdateQuest(
  questId, -- string
  {
    name = "New Name",           -- optional
    description = "New Desc",    -- optional
    categoryId = "side"          -- optional
  },
  playerId -- number (optional)
)

πŸ“Š SetQuestProgress

Adds or updates a progress tracker for a quest.

exports['pyro-Missions']:SetQuestProgress(
  questId,        -- string
  progressId,     -- string (unique within the quest)
  progressName,   -- string (label)
  progressValue,  -- string (e.g., "3/10")
  playerId        -- number (optional)
)

⏱ SetQuestStage

Adds or updates a stage in a quest.

exports['pyro-Missions']:SetQuestStage(
  questId,         -- string
  stageId,         -- string (unique within quest)
  stageName,       -- string
  stageDescription,-- string
  isCompleted,     -- boolean
  playerId         -- number (optional)
)

πŸ§ͺ Examples

🌐 Global Quest

exports['pyro-Missions']:AddQuest("farm_quest", "primary", "Farm Work", "Help the farmer with chores.")

exports['pyro-Missions']:SetQuestStage("farm_quest", "stage_1", "Meet Farmer", "Go to the farm.", false)
exports['pyro-Missions']:SetQuestStage("farm_quest", "stage_2", "Harvest Crops", "Collect 20 bundles.", false)

exports['pyro-Missions']:SetQuestProgress("farm_quest", "progress_1", "Wheat Collected", "0/20")

πŸ‘€ Player-Specific Quest

local playerId = 1

exports['pyro-Missions']:AddQuest("secret_"..playerId, "faction", "Secret Ops", "For your eyes only.", playerId)

exports['pyro-Missions']:SetQuestStage("secret_"..playerId, "intel_stage", "Gather Intel", "Find 3 documents.", false, playerId)

exports['pyro-Missions']:SetQuestProgress("secret_"..playerId, "intel_progress", "Intel", "0/3", playerId)

πŸ’‘ Tips & Best Practices

Tip
Info

Use player-specific IDs

e.g., "quest_name_"..playerId to avoid duplication

Keep quest IDs unique

They must not conflict

Update progress often

For immersive tracking (e.g., after each item collect)

Categories must match

IDs must exist in Config.Categories


πŸ“ž Support

Need help or have a feature request? β†’ PyroByte Discord

Last updated