Installation

Here you can see how to install and setup upgrade-damage for your server.

Drop the files in your server

Start by dropping the files included in the resource from keymaster into your resources folder, make sure to ensure the resource in your server.cfg

ensure upgrade-rewards

Setup Config

The config is relatively simple to setup. It allows you to customize most ui components, the shops, the items, and any random loot cases.

Config = {}

-- Framework Configuration (Auto-detected by bridge files)
-- Supports: QBox (qbx_core), QBCore (qb-core), ESX (es_extended)
-- Inventory system (leave nil for auto-detect)
Config.Inventory = nil -- Options: nil (auto-detect), 'ox_inventory', 'qb-inventory', 'ps-inventory', 'qs-inventory', 'lj-inventory', 'esx-inventory'
Config.Notify = 'QBCore' -- Options: 'QBox', 'QBCore', 'ESX', 'ox_lib', 'okokNotify', 'custom'

-- Inventory Image Path Mapping
Config.InventoryImagePaths = {
    ['ox_inventory'] = 'nui://ox_inventory/web/images',
    ['qb-inventory'] = 'nui://qb-inventory/html/images',
    ['ps-inventory'] = 'nui://ps-inventory/html/images',
    ['qs-inventory'] = 'nui://qs-inventory/html/images',
    ['lj-inventory'] = 'nui://lj-inventory/html/images',
    ['esx-inventory'] = 'nui://es_extended/html/img/items',
    -- Fallback paths for framework defaults
    ['qbx_core'] = 'nui://qb-inventory/html/images',
    ['qb-core'] = 'nui://qb-inventory/html/images',
    ['es_extended'] = 'nui://es_extended/html/img/items'
}

-- Basic Reward Settings
Config.PlayTimeMinutes = 60
Config.GivePeriodPoints = 10
Config.ReferreeReward = 50
Config.ReferrerReward = 100

-- Referral System Settings  
Config.ReferralSystem = {
    Enabled = true, -- Set to false to disable referral system entirely
}

-- UI Configuration
Config.UI = {
    -- Main keybinding for opening rewards menu
    OpenKey = 'F11',
    OpenKeyDescription = 'Open Rewards Menu',
    
    -- UI Text and Labels
    MainTitle = 'PLAYER REWARDS',
    MainSubtitle = 'Earn points, level up, unlock exclusive rewards',
    
    -- Default shopkeeper settings (fallback when shop doesn't specify)
    DefaultShopkeeperImage = './images/shopkeepers/default.png',
    DefaultShopkeeperDialogue = 'Welcome to my shop! Take a look around!',
    
    -- Color scheme variables (can be overridden in CSS)
    PrimaryColor = '#4a90e2',
    SecondaryColor = '#2c3e50',
    AccentColor = '#34495e',
    SuccessColor = '#3498db',
    
    -- Animation settings
    ModalAnimationSpeed = 300,
    FadeSpeed = 300,
    
    -- Default item images
    CashImage = './images/items/money.png',
    PointsImage = './images/items/points.png',
}

-- Level System
Config.LevelSystem = {
    BaseXP = 100, -- Base XP needed for level 1
    Multiplier = 1.5, -- How much more XP is needed for each subsequent level
    MaxLevel = 100, -- Maximum level a player can reach
    
    -- Rewards per level increase
    PointMultiplier = 0.1, -- Each level gives +10% more points (level 10 = +100% points)
    
    -- Titles assigned every 5 levels
    Titles = {
        [1] = "Newbie",
        [5] = "Rookie",
        [10] = "Amateur",
        [15] = "Hustler",
        [20] = "Established",
        [25] = "Professional",
        [30] = "Veteran",
        [35] = "Expert",
        [40] = "Master",
        [45] = "Legend",
        [50] = "Icon",
        [55] = "Mastermind",
        [60] = "Kingpin",
        [65] = "Overlord",
        [70] = "Godfather",
        [75] = "Dominator",
        [80] = "Sovereign",
        [85] = "Immortal",
        [90] = "Deity",
        [95] = "Omnipotent",
        [100] = "Los Santos Legend"
    }
}

-- Rewards Shops
Config.Shops = {
    {
        name = "Bum's Bargains",
        description = "Only the cheapest of items here. Nothing to write home about.",
        image = "./images/shops/bum.png",
        shopkeeper_image = "./images/shopkeepers/bum.png",
        shopkeeper_dialogue = "I find all my stuff in trash around the city! Best deals in town!",
        requiredLevel = 1,
        items = {
            {type = "item", name = "oxy", label = "Oxy", count = 5, points = 30},
            {type = "item", name = "ifaks", label = "IFAK", count = 5, points = 40},
            {type = "cash", name = "cash_5k", label = "$5,000", count = 5000, points = 50},
            {type = "loot", name = "low_loot", label = "Low Quality Case", points = 30, image = "./images/commoncase.png"}
        }
    },
    {
        name = "Street Vendor",
        description = "Slightly better items, but don't expect miracles.",
        image = "./images/shops/street.png",
        shopkeeper_image = "./images/shopkeepers/street.png",
        shopkeeper_dialogue = "Psst... over here! I got some better stuff than that bum down the block.",
        requiredLevel = 5,
        items = {
            {type = "item", name = "advancedlockpick", label = "Advanced Lockpick", count = 5, points = 60},
            {type = "item", name = "handcuffs", label = "Handcuffs", count = 1, points = 75},
            {type = "cash", name = "cash_10k", label = "$10,000", count = 10000, points = 100},
            {type = "loot", name = "med_loot", label = "Medium Quality Case", points = 60, image = "./images/medcase.png"}
        }
    },
    {
        name = "Regular Joe's",
        description = "Everyday items for the everyday criminal.",
        image = "./images/shops/regular.png",
        shopkeeper_image = "./images/shopkeepers/regular.png",
        shopkeeper_dialogue = "Welcome friend! Just your average shop with average prices for average criminals.",
        requiredLevel = 10,
        items = {
            {type = "item", name = "armor", label = "Armor", count = 10, points = 120},
            {type = "item", name = "weapon_switchblade", label = "Switchblade", count = 1, points = 150},
            {type = "cash", name = "cash_25k", label = "$25,000", count = 25000, points = 250},
            {type = "loot", name = "high_loot", label = "High Quality Case", points = 90, image = "./images/rarecase.png"}
        }
    },
    {
        name = "Middle Class Merchandise",
        description = "Respectable goods for those who've earned some respect.",
        image = "./images/shops/middle.png",
        shopkeeper_image = "./images/shopkeepers/middle.png",
        shopkeeper_dialogue = "Ah, a customer with some class! You'll find quality merchandise here, worth every point.",
        requiredLevel = 20,
        items = {
            {type = "item", name = "weapon_pistol", label = "Pistol", count = 5, points = 200},
            {type = "item", name = "armor", label = "Armor", count = 10, points = 180},
            {type = "cash", name = "cash_50k", label = "$50,000", count = 50000, points = 500},
            {type = "vehicle", name = "kamacho", label = "Kamacho", points = 375}
        }
    },
    {
        name = "Upper Echelon",
        description = "Finer things for those with refined tastes.",
        image = "./images/shops/upper.png",
        shopkeeper_image = "./images/shopkeepers/upper.png",
        shopkeeper_dialogue = "Excellent taste! You clearly understand quality when you see it. Browse my exclusive collection.",
        requiredLevel = 35,
        items = {
            {type = "item", name = "goldbar", label = "Gold Bar", count = 4, points = 350},
            {type = "vehicle", name = "banshee", label = "Banshee", count = 1, points = 400},
            {type = "cash", name = "cash_100k", label = "$100,000", count = 100000, points = 1000},
            {type = "vehicle", name = "advancedlockpick", label = "Advanced Lockpick", count = 10, points = 425}
        }
    },
    {
        name = "Criminal Connoisseur",
        description = "Premium goods for established criminals.",
        image = "./images/shops/criminal.png",
        shopkeeper_image = "./images/shopkeepers/criminal.png",
        shopkeeper_dialogue = "Welcome, professional. You've earned your way here. Only the finest contraband for serious operators.",
        requiredLevel = 50,
        items = {
            {type = "item", name = "high_loot", label = "High Quality Case", count = 1, points = 500},
            {type = "item", name = "goldbar", label = "Gold Bar", count = 10, points = 600},
            {type = "cash", name = "cash_250k", label = "$250,000", count = 250000, points = 2500},
            {type = "vehicle", name = "banshee", label = "Banshee", points = 500}
        }
    },
    {
        name = "Elite Emporium",
        description = "Only the truly dedicated may shop here.",
        image = "./images/shops/elite.png",
        shopkeeper_image = "./images/shopkeepers/elite.png",
        shopkeeper_dialogue = "Impressive. Few have reached this level. You deserve access to my most exclusive inventory.",
        requiredLevel = 70,
        items = {
            {type = "item", name = "goldbar", label = "Gold Bar", count = 20, points = 1200},
            {type = "cash", name = "cash_500k", label = "$500,000", count = 500000, points = 5000},
            {type = "vehicle", name = "kuruma", label = "Kuruma", points = 525},
            {type = "loot", name = "elite_loot", label = "Elite Quality Case", points = 150, image = "./images/rarecase.png"}
        }
    },
    {
        name = "Vinewood Luxuries",
        description = "The pinnacle of criminal excellence. Reserved for legends.",
        image = "./images/shops/vinewood.png",
        shopkeeper_image = "./images/shopkeepers/vinewood.png",
        shopkeeper_dialogue = "A true legend graces my establishment. Welcome to the pinnacle of criminal luxury - only the absolute best.",
        requiredLevel = 100,
        items = {
            {type = "cash", name = "cash_1mil", label = "$1,000,000", count = 1000000, points = 10000},
            {type = "vehicle", name = "impaler", label = "Impaler", points = 575},
            {type = "loot", name = "legendary_loot", label = "Legendary Quality Case", points = 250, image = "./images/rarecase.png"}
        }
    }
}

Config.Cases = {
    low_loot = {
        label = "Low Quality Case",
        points = 30,
        items = {
            low = {
                {type = "item", item = "oxy", label = "Oxy", count = 5},
                {type = "points", label = "15 Rewards Points", count = 15},
                {type = "cash", item = "money", label = "$5,000", count = 5000},
                {type = "item", item = "ifaks", label = "IFAK", count = 5},
            },
            high = {
                {type = "points", label = "30 Rewards Points", count = 30},
                {type = "item", item = "weapon_golfclub", label = "Golf Club", count = 1},
                {type = "item", item = "goldbar", label = "10 Gold Bars", count = 10},
            },
            rare = {
                {type = "points", label = "80 Rewards Points", count = 80},
                {type = "points", label = "60 Rewards Points", count = 60},
                {type = "item", item = "goldbar", label = "20 Gold Bars", count = 20},
                {type = "cash", item = "money", label = "$15,000", count = 15000},
            }
        }
    },
    med_loot = {
        label = "Medium Quality Case",
        points = 60,
        items = {
            low = {
                {type = "item", item = "handcuffs", label = "Handcuffs", count = 1},
                {type = "points", label = "30 Rewards Points", count = 30},
                {type = "item", item = "advancedlockpick", label = "Advanced Lockpick", count = 10},
            },
            high = {
                {type = "points", label = "60 Rewards Points", count = 60},
                {type = "item", item = "weapon_bottle", label = "Broken Glass", count = 1},
                {type = "item", item = "weapon_switchblade", label = "Switchblade", count = 1},
                {type = "item", item = "armor", label = "Armor", count = 10},
                {type = "cash", item = "money", label = "$25,000", count = 25000},
            },
            rare = {
                {type = "cash", item = "money", label = "$40,000", count = 40000},
                {type = "points", label = "120 Rewards Points", count = 120},
                {type = "item", item = "cleaning_kit", label = "Cleaning Kit", count = 10},
                {type = "item", item = "repair_kit", label = "Repair Kit", count = 5},
            }
        }
    },
    high_loot = {
        label = "High Quality Case",
        points = 90,
        items = {
            low = {
                {type = "item", item = "contract", label = "Contract", count = 1},
                {type = "points", label = "60 Rewards Points", count = 60},
                {type = "item", item = "weapon_knuckle", label = "Knuckle Dusters", count = 1},
            },
            high = {
                {type = "points", label = "90 Rewards Points", count = 90},
                {type = "cash", item = "money", label = "$50,000", count = 50000},
                {type = "item", item = "parachute", label = "Parachute", count = 1},
                {type = "item", item = "harness", label = "Harness", count = 1},
            },
            rare = {
                {type = "item", item = "nitrous_bottle", label = "Nitrous", count = 1},
                {type = "points", label = "180 Rewards Points", count = 180},
                {type = "item", item = "heavyarmor", label = "Heavy Armor", count = 4},
                {type = "cash", item = "money", label = "$100,000", count = 100000},
            }
        }
    },
    elite_loot = {
        label = "Elite Quality Case",
        points = 150,
        items = {
            low = {
                {type = "item", item = "goldbar", label = "Gold Bar", count = 5},
                {type = "points", label = "150 Rewards Points", count = 150},
                {type = "item", item = "weapon_bat", label = "Bat", count = 1},
            },
            high = {
                {type = "points", label = "300 Rewards Points", count = 300},
                {type = "cash", item = "money", label = "$150,000", count = 150000},
                {type = "item", item = "heavyarmor", label = "Heavy Armor", count = 10},
            },
            rare = {
                {type = "item", item = "goldbar", label = "Gold Bar", count = 30},
                {type = "points", label = "500 Rewards Points", count = 500},
                {type = "cash", item = "money", label = "$300,000", count = 300000},
            }
        }
    },
    legendary_loot = {
        label = "Legendary Quality Case",
        points = 250,
        items = {
            low = {
                {type = "item", item = "goldbar", label = "Gold Bar", count = 20},
                {type = "points", label = "300 Rewards Points", count = 300},
                {type = "cash", item = "money", label = "$200,000", count = 200000},
            },
            high = {
                {type = "points", label = "600 Rewards Points", count = 600},
                {type = "cash", item = "money", label = "$400,000", count = 400000},
                {type = "vehicle", item = "kamachoc", label = "Kamacho", count = 1},
            },
            rare = {
                {type = "vehicle", item = "impaler", label = "Drift Impaler", count = 1},
                {type = "points", label = "1000 Rewards Points", count = 1000},
                {type = "cash", item = "money", label = "$750,000", count = 750000},
            }
        }
    }
}

Database

This system automatically sets up its database tables, so there is no need to install any SQL

Dependencies

This script only requires a framework QBCore, QBox, or ESX and it auto detects your framework. It also can auto detect your inventory system, however if you have problems with the auto detection you have the ability in the config to set your inventory system.

Last updated