Objectives for FiveM
A guide to install Objectives for FiveM
๐ Table of Contents
- ๐ฏ Overview
- ๐ Purchase Information
- ๐บ Installation Tutorial
- โ ๏ธ Important Pre-Installation Notes
- ๐ง System Requirements & Compatibility
- ๐ฆ Installation Process
- โ๏ธ Configuration Setup
- ๐ฎ How It Works
- ๐ Integration & Compatibility
- ๐ Exports
- ๐ ๏ธ Troubleshooting
- ๐ก Best Practices
- ๐ Support
๐ฏ Overview
Simply use client-side exports to invoke objectives on your game screen and give context to what your players can do in your FiveM server. Objectives provides a clean, customizable way to display mission information, hints, and guidance directly to players.
Key Features
- โ Client-Side Exports - Easy integration with any script
- โ Customizable Styling - Configure the appearance of objectives
- โ Universal Compatibility - Works with any FiveM server
- โ Duration Control - Set custom display duration
- โ Clear Function - Remove objectives when needed
- โ Escrow Protection - Secure resource protection
- โ Lightweight - Minimal performance impact
๐ Purchase Information
Get Objectives:
Purchase on Nights Software Store
๐บ Installation Tutorial
Watch the installation tutorial:
โ ๏ธ Important Pre-Installation Notes
Critical Installation Order: Always follow this exact sequence to avoid parsing errors in the F8 console:
- Download ZIP Package from CFX Portal
- Unpack in a folder on your local machine
- Set File Transfer Protocol (FTP) type to binary
- Drag files from local machine to server resources folder
- Add to server.cfg (ensure script)
- Boot up the server
Support Policy: Follow this guide step by step. If youโre stuck, ask for support in our Discord and provide the specific step name. Do not skip steps.
๐ง System Requirements & Compatibility
Framework Compatibility
- โ Standalone: Works independently without any framework
- โ Any FiveM Server: Universal compatibility
OneSync Compatibility
- โ OneSync Legacy: Fully tested and compatible
- โ OneSync Infinity: Fully tested and compatible
Note: Objectives is designed to work with any FiveM server configuration and doesnโt require specific framework dependencies.
๐ฆ Installation Process
Step 1: Download & Install
- Download the resource from the CFX Portal after purchase
- Extract the ZIP package to your local machine
- Transfer files using binary FTP mode to your serverโs resources folder
- Ensure the folder is named
night_objectives
(do not rename)
Step 2: Server Configuration
Add the resource to your server.cfg
:
ensure night_objectives
Step 3: Verify Installation
- Start your server and check the console for any errors
- Test the resource by using the exports in a client script
- Verify functionality by displaying a test objective
โ๏ธ Configuration Setup
Required Tools
Visual Studio Code: We recommend downloading VS Code for editing Lua files.
Configuration Files
File | Purpose |
---|---|
night_objectives/config/config.lua | Main configuration and styling settings |
night_objectives/client/c_functions.lua | Client-side functions |
night_objectives/server/s_functions.lua | Server-side functions |
Configuration Process
- Open VS Code and navigate to the config files
- Read thoroughly - each line has explanatory comments
- Configure styling - customize the appearance of objectives
- Test frequently - use F8 console for error checking
Styling Options: The config file contains all styling options for customizing the appearance of objectives.
๐ฎ How It Works
Display Objectives
Use the client-side export to display objectives on the playerโs screen:
exports.night_objectives:DisplayObjective(
true, -- display (true/false)
"Mission Title", -- title
"Mission Description", -- description
"Helpful Hint", -- hint
15 -- duration in seconds
)
Clear Objectives
Remove objectives from the screen:
exports.night_objectives:ClearObjective()
Integration Examples
Mission System Integration:
-- Display mission objective
exports.night_objectives:DisplayObjective(true, "Deliver Package", "Take the package to the marked location", "Follow the GPS route", 30)
-- Clear when mission completes
exports.night_objectives:ClearObjective()
Job System Integration:
-- Display job instructions
exports.night_objectives:DisplayObjective(true, "Police Duty", "Patrol the city and respond to calls", "Use /911 to respond to emergencies", 60)
๐ Integration & Compatibility
Framework Support
- Standalone - Works independently without framework dependencies
Script Integration
- Mission Systems - Display mission objectives and progress
- Job Systems - Show job-specific instructions and tasks
- Tutorial Systems - Guide new players through features
- Event Systems - Display event information and instructions
Universal Integration: Objectives can be integrated into any FiveM script using simple client-side exports.
๐ Exports
Client-Side Exports
-- Display an objective
exports.night_objectives:DisplayObjective(
display, -- boolean: true to show, false to hide
title, -- string: objective title
description, -- string: objective description
hint, -- string: helpful hint text
duration -- number: display duration in seconds
)
-- Clear all objectives
exports.night_objectives:ClearObjective()
Parameter Details
Parameter | Type | Description |
---|---|---|
display | boolean | Set to true to show objective, false to hide |
title | string | The main title of the objective |
description | string | Detailed description of what the player should do |
hint | string | Additional helpful hint or instruction |
duration | number | How long to display the objective in seconds |
๐ ๏ธ Troubleshooting
Common Issues
Export Not Found
- Ensure the resource is properly started in server.cfg
- Check that the resource name is
night_objectives
- Verify the resource started without errors in console
Objectives Not Displaying
- Check F8 console for any error messages
- Verify the export parameters are correct
- Ensure the display parameter is set to
true
Styling Issues
- Check the config.lua file for styling settings
- Verify CSS/styling configurations are correct
- Test with default settings first
Debugging Tips
- Check F8 Console - Look for any error messages
- Test with Simple Export - Start with basic parameters
- Verify Resource Loading - Ensure resource starts without errors
- Check File Permissions - Ensure all files are accessible
๐ก Best Practices
Objective Design
- Clear Titles - Use concise, descriptive titles
- Detailed Descriptions - Provide enough information for players to understand
- Helpful Hints - Include additional guidance when needed
- Appropriate Duration - Set duration based on objective complexity
Integration Tips
- Consistent Styling - Use consistent objective formatting across your server
- Clear Objectives - Always clear objectives when theyโre no longer relevant
- Error Handling - Implement proper error handling for export calls
- Performance - Donโt spam objectives; use appropriate timing
User Experience
- Progressive Disclosure - Show objectives as players progress
- Contextual Information - Display objectives relevant to current situation
- Clear Instructions - Make objectives easy to understand and follow
- Visual Hierarchy - Use titles and descriptions effectively
๐ Support
Read through the instructions again if you have not managed to install the resource. Canโt get it to work still? Create a ticket through our dedicated support system in Discord: