CASE
FiveM Case Configuration Guide
Configuration
The configuration file allows you to set up various aspects of the system, such as the database, framework, and integration with Tebex and Discord.
Config File
Config = {}
Config.Tebex = false
Config.Log = "webhook add"
Config.MySQL = "mysql-async" -- mysql-async, oxmysql, or ghmattimysql
Config.Framework = "QBCore" -- QBCore, ESX, OLDQBCore, or NewESX
Config.FormattedToken = "discord-api" -- Add your Discord bot token from https://discord.com/developers/applications
Config.Garage = "qb-garages" -- For qb-garages select 'individual', for other garages select 'all'
Framework Setup
This function determines which framework you are using (QBCore, ESX, OLDQBCore, or NewESX) and fetches the shared object for that framework.
function GetFramework()
local Get = nil
if Config.Framework == "ESX" then
while Get == nil do
TriggerEvent('esx:getSharedObject', function(Set) Get = Set end)
Citizen.Wait(0)
end
end
if Config.Framework == "NewESX" then
Get = exports['es_extended']:getSharedObject()
end
if Config.Framework == "QBCore" then
Get = exports["qb-core"]:GetCoreObject()
end
if Config.Framework == "OldQBCore" then
while Get == nil do
TriggerEvent('QBCore:GetObject', function(Set) Get = Set end)
Citizen.Wait(200)
end
end
return Get
endDiscord Integration
These functions allow you to send requests to the Discord API and get user avatars.
HTTP GET Request
This function allows you to make HTTP GET requests.
Case System Configuration
Define the system configurations for case categories, store gold section, and items that can be found in the case.
Live Cases
Define the items and categories for live cases.
Standard Cases
Define the items and categories for standard cases.
Summary
This guide provides the essential configurations and functions needed to set up your FiveM case system. Customize each section to fit your server's requirements and integrate these configurations into your documentation for clear and comprehensive instructions for your users.
Last updated