Configuration
General Configuration
Config, Noti, Lang = {}, {}, {}
-- Use "esx" or "qb"
Config.Framework = "qb"
-- If you are using one of the most recent versions of ESX, set the script name. Default = "es_extended"
Config.ESXExport = "es_extended"
-- Default ESX: "esx:getSharedObject" | Default QB: "qb-core"
Config.Core = "qb-core"
-- oxmysql, mysql-async or ghmattisql
Config.Mysql = "oxmysql"
-- Command to open the menu
Config.command = "rewards"
Notifications
function notifications(notitype, message, time)
-- Change this trigger for your notification system keeping the variables
TriggerEvent('codem-notification', message, time, notitype)
end
-- Notifications types:
Noti.info = 'info'
Noti.check = 'check'
Noti.error = 'error'
-- Notification time:
Noti.time = 5000
Target Configuration
Config.useTarget = true
function target(element, event, isMission, task)
local zOffset = 1.0
local entityCoords = GetEntityCoords(element)
local minZ = entityCoords.z - zOffset
local maxZ = entityCoords.z + zOffset
if isMission then
else
exports["qb-target"]:AddTargetEntity(
element,
{
options = {
{
type = "client",
event = "bit-advancedtasks:targetMain",
icon = "fa-solid fa-scythe",
label = "Interact",
args = {
task = task
}
}
},
distance = 2.5
}
)
end
end
Reward Types
The reward system supports multiple types:
Money Reward
rewardType = "money",
rewardItemsOrWeapons = {},
rewardMoney = 2500
Item Reward
rewardType = "item",
rewardItemsOrWeapons = {
{itemName = "goldbar", amount = 3}
},
rewardMoney = 0
Weapon Reward
rewardType = "weapon",
rewardItemsOrWeapons = {
{itemName = "weapon_pistol", amount = 1}
},
rewardMoney = 0