documentation
  • GENERAL INFORMATION
    • 🔷Tebex Integration
    • 👾Code Creator
    • 🔌REACT
  • PACKAGES
    • RADIO
    • NPC DIALOG
    • CARPLAY
    • SCOREBOARD
    • CARSHOP
    • GARAGE
    • GUNSHOP
    • RENT A CAR
    • CRAFTING
    • DRIVING SCHOOL
    • CUSTOMS
    • CASE
    • DAİLYREWARD
    • BLACKMARKET
    • REPORT
    • CLOTHESHOP
    • REGİSTER
    • CREATOR
    • VIPSYSTEM
    • NOTIFICATION
    • FİSHİNG
    • DİVİNG
    • PROGRESS & NOTIFY
    • NEW YEAR
Powered by GitBook
On this page
  1. PACKAGES

DAİLYREWARD

FiveM Daily Reward System Configuration Guide

Configuration

The configuration file allows you to set up various aspects of the daily reward system, such as the database, framework, and the daily rewards themselves.

Config File

Config = {}

Config.Framework = 'QBCore' -- QBCore or ESX or OLDQBCore or NewESX

Daily Rewards Setup

This section defines the rewards for each day. You can customize the label, pack, name, color, hours (h), and description for each day.

Config.Daily = {
    {selected = false, label = 'gift', pack = 'gift', name = 'DAY 1', color = '#E13A62', h = 24, description = "Valuables"}, 
    {selected = false, label = 'cash', pack = 'cash', name = 'DAY 2', color = '#3AE1A5', h = 48, description = "Cash"}, 
    {selected = false, label = 'gun', pack = 'gun', name = 'DAY 3', color = '#E16C3A', h = 72, description = "9MM Guns"}, 
    {selected = false, label = 'medic', pack = 'medic', name = 'DAY 4', color = '#FEFEFE', h = 96, description = "Medical Tools"},
    {selected = false, label = 'revive', pack = 'revive', name = 'DAY 5', color = '#BFFF38', h = 120, description = "Medical Tools"}, 
    {selected = false, label = 'gift', pack = 'gift', name = 'GIFT NAME', color = '#E13A62', h = 144, description = "Valuables"}, 
    {selected = false, label = 'gift', pack = 'gift', name = 'GIFT NAME', color = '#E13A62', h = 168, description = "Valuables"}
}

Reward Items Setup

This section defines the items given for each type of reward pack.

Config.Give = {
    ['gift'] = { 
        items = {
            {item = "phone", count = 1},
            {item = "tablet", count = 1},
        }
    },
    ['revive'] = { 
        items = {
            {item = "bandage", count = 1}, 
            {item = "ifaks", count = 1},
            {item = "painkillers", count = 1},
        }
    },
    ['gun'] = { 
        items = {
            {item = "weapon_pistol", count = 1},
            {item = "weapon_microsmg", count = 1},
            {item = "lockpick", count = 1}
        }
    },
    ['medic'] = { 
        items = {
            {item = "walkstick", count = 1},
        }
    },
    ['cash'] = { 
        items = {
            {item = "moneybag", count = 1},
        }
    },
}

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
end

Summary

This guide provides the essential configurations and functions needed to set up your FiveM daily reward system. Customize each section to fit your server's requirements and integrate these configurations into your server scripts for a fully functional daily reward system.

PreviousCASENextBLACKMARKET

Last updated 11 months ago