Infinity Store
Tebex StoreDiscord
  • CFX Auth
  • Resources
    • Scoreboard
      • Installation
      • Configuration
      • Robbery Integration
      • Exports
    • Squad system
      • Installation
      • Configuration
      • Exports
    • Notification
      • Installation
      • Configuration
      • Exports
    • Dashboard V2
      • Installation
      • Configuration
      • Webhooks
      • Exports
    • Job choice
      • Installation
      • Configuration
      • Exports
    • Pausemenu
      • Installation
      • Configuration
      • Exports
    • Playtime Shop
      • Installation
      • Configuration
      • Client events
      • SQL
      • Exports
    • Identity
      • Installation
      • Configuration
      • Exports
    • Keyguide
      • Installation
      • Configuration
      • Exports
    • HUD + UI LIB
      • Installation
      • Configuration
      • Customization
      • Exports
  • Military resources
    • Mortar
      • Installiation
      • Configuration
      • Exports
    • Bomb drone
      • Installiation
      • Configuration
      • Exports
    • Claymore
      • Installiation
      • Configuration
      • Exports
Powered by GitBook
On this page

Was this helpful?

  1. Resources
  2. Dashboard V2

Configuration

Config = {}

Config.language ='en' -- Select langauge: 'en', 'your language name'
Config.botToken = '' -- Discord bot token (to get discord pfp if not then it will use Config.serverLogo)

-- Webhooks
Config.webhook_buyItem = ''
Config.webhook_buyVehicle = ''
Config.webhook_addPP = ''

Config.dashboardCommand = 'dash' -- Command Name
Config.dashboardOpenKey = 'F9' -- Quick open button
Config.serverName = 'Infinity' -- Your Server Name
Config.serverType = 'Roleplay' -- Your Server Type (Roleplay, DM)
Config.serverLogo = 'https://cdn.discordapp.com/attachments/805801546461610004/1202360944672657489/infinityLogo.png?ex=65cd2ce3&is=65bab7e3&hm=771e9a7dcce3973dd72712279845ca88ae26ed5a91a8bac000fac09f2a2b64f4&'
Config.heightType = 'cm' -- The character height type

-- The salary time for the jobs
Config.salaryTimes = {
    ['police'] = '7min',
    ['ambulance'] = '15min',
    ['taxi'] = '10min',
    ['unemployed'] = '20min',
}

Config.currency = '$' -- The currency of your server
Config.hour = 'h' -- Time Type
Config.refreshPlayTime = 1 -- Refresh playtime (in minute)

-- Vehicle Test
Config.testTime = 10 -- Test ride time (in sec)
Config.spawnVehicle = { 
    coords = vector3(-1729.6676, -2903.6140, 13.9443), 
    heading = 330.0,
}

-- Settings
Config.hud = true -- Starting value in the settings
Config.minimap = true -- Starting value in the settings

Config.customNotify = false -- Enable/Disable custom notify

-- Staff Permissions (if false it won't appear in the staff menu)
Config.staffs = {
    ['user'] = false,
    ['member'] = false,
    ['admin'] = true,
    ['superadmin'] = true,
    ['cizizen'] = false,
}

-- Premium Point Permissions (if false it won't appear in the staff menu)
Config.ppPermissions = {
    ['admin'] = true,
    ['mod'] = true,
    ['god'] = true,
}
Framework = nil
SelectedFramework = nil
RecordExist = false
Settings = {hud = Config.hud, minimap = Config.minimap}
identifier = nil

-- Get Framework
if GetResourceState("es_extended") == "started" then
    Framework = exports["es_extended"]:getSharedObject()
    SelectedFramework = 'esx'
elseif GetResourceState("qb-core") == "started" then
    Framework = exports["qb-core"]:GetCoreObject()
    SelectedFramework = 'qbcore'
else
    -- Custom Framework goes here ...
    return
end

-- TriggerServerEvent
function FrameworkTriggerEvent(eventName, callback, arguments)
    if SelectedFramework == 'esx' then 
        Framework.TriggerServerCallback(eventName, callback, arguments)
    elseif SelectedFramework == 'qbcore' then
        Framework.Functions.TriggerCallback(eventName, callback, arguments)
    else
        Integrates.TriggerEvent(eventName, callback, arguments)
    end
end

-- RegisterServerEvent
function FrameworkRegisterEvent(eventName, callback)
    if SelectedFramework == 'esx' then 
        Framework.RegisterServerCallback(eventName, callback)
    elseif SelectedFramework == 'qbcore' then
        Framework.Functions.CreateCallback(eventName, callback)
    else
        Integrates.RegisterEvent(eventName, callback)
    end
end

-- Get Identifier
function GetIdentifier(id)
    if SelectedFramework == 'esx' then 
        local xPlayer = Framework.GetPlayerFromId(id)
        identifier = xPlayer.getIdentifier(id)
    elseif SelectedFramework == 'qbcore' then
        local Player = Framework.Functions.GetPlayer(id)
        identifier = Player.PlayerData.license
    else
        identifier = Integrates.GetPlayerIdentifier(id)
    end
end

-- Get Player Avatar
function getPlayerIdentifier(player, identifier)
    for k, v in pairs(GetPlayerIdentifiers(player)) do
        if string.sub(v, 1, string.len(identifier .. ":")) == identifier .. ":" then
            return string.gsub(v, identifier .. ':', "")
        end
    end
end

function getPlayerAvatar(source)
    if #Config.botToken == 0 then 
        return Config.serverLogo
    else
        local userid = getPlayerIdentifier(source, 'discord')
        local avatarUrl = nil
        PerformHttpRequest(
            "https://discordapp.com/api/users/"..userid,
            function(errorCode, resultData, resultHeaders) 
                local avatarid = json.decode(resultData).avatar
                avatarUrl = 'https://cdn.discordapp.com/avatars/'..userid..'/'..avatarid..'.png'
            end,
            "GET",
            "",
            {
                ["Content-Type"] = "application/json",
                ["Authorization"] = "Bot " .. Config.botToken,
                ["Content-Length"] = "0",
            }
        )
        Wait(1000)
        return avatarUrl
    end
end

-- Get Player Database
function playerDatabase()
    local playerDatabase = MySQL.query.await('SELECT * FROM dashboard WHERE identifier = @identifier', {['@identifier'] = identifier})
    
    if playerDatabase[1].date ~= os.date("%x") then 
        refreshDate()
    end

    return playerDatabase
end

-- Get Player bills
function playerBills()
    if SelectedFramework == 'esx' then 
        local bills = Integrates.GetPlayerBills()
        return bills
    elseif SelectedFramework == 'qbcore' then
        local bills = Integrates.GetPlayerBills()
        return bills
    else
        local bills = Integrates.GetPlayerBills()
        return bills
    end
end

-- RefreshPP
function refreshPP(id)
    local ppIdentifier = nil
    if SelectedFramework == 'esx' then 
        local xPlayer = Framework.GetPlayerFromId(id)
        ppIdentifier = xPlayer.getIdentifier(id)
    elseif SelectedFramework == 'qbcore' then
        local Player = Framework.Functions.GetPlayer(id)
        ppIdentifier = Player.PlayerData.license
    else
        ppIdentifier = IRefreshPlayTimentegrates.GetPlayerPPIdentifier(id)
    end
    
    local playerPP = MySQL.query.await('SELECT pp FROM dashboard WHERE identifier = @identifier', {['@identifier'] = ppIdentifier})
    return playerPP[1].pp
end

-- Refresh Date
function refreshDate()
    MySQL.update.await('UPDATE dashboard SET date = @date, playtime = @playtime WHERE identifier = @identifier', {
        ['@identifier'] = identifier,
        ['@date'] = os.date("%x"),
        ['@playtime'] = 0,
    })
end

-- Get BirthDay
function parseDate(date)
    local parsedDay, parsedMonth, parsedYear = date:match("(%d+)%D+(%d+)%D+(%d+)")
    return {day = parsedDay, month = parsedMonth, year = parsedYear}
end

function CheckPermission(permissions)
    local hasPermission = false

    for permission, _ in pairs(permissions) do
        if Config.ppPermissions[permission] then
            hasPermission = true
        end
    end

    return hasPermission
end

-- Get Player Datas
function GetPlayerDatas(source)
    if SelectedFramework == 'esx' then 
        local xPlayer = Framework.GetPlayerFromId(source)
        local playerDatabase = playerDatabase()
        local bills = playerBills()

        PlayerDatas = {
            name = xPlayer.getName(),
            id = source,
            job = xPlayer.getJob().name,
            jobgrade_name = xPlayer.getJob().grade_name,
            salary = xPlayer.getJob().grade_salary,
            salaryTime = Config.salaryTimes[string.lower(xPlayer.getJob().name)],
            currency = Config.currency,
            cash = xPlayer.getAccount('money').money,
            bank = xPlayer.getAccount('bank').money,
            black_money = xPlayer.getAccount('black_money').money,
            permission = xPlayer.getGroup(),
            gender = xPlayer.variables.sex == 'm' and 'male' or 'female',
            height = xPlayer.variables.height,
            birthday = parseDate(xPlayer.variables.dateofbirth),
            hud = Settings.hud,
            minimap = Settings.minimap,
            pp = playerDatabase[1].pp,
            playtime = playerDatabase[1].playtime,
            bills = bills,
        }   

        return PlayerDatas
    elseif SelectedFramework == 'qbcore' then
        local Player = Framework.Functions.GetPlayer(source)
        local playerDatabase = playerDatabase()
        local bills = playerBills()

        PlayerDatas = {
            name = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname,
            id = source,
            job = Player.PlayerData.job.name,
            jobgrade_name = Player.PlayerData.job.grade.name,
            salary = Player.PlayerData.job.payment,
            salaryTime = Config.salaryTimes[string.lower(Player.PlayerData.job.name)],
            currency = Config.currency,
            cash = Player.PlayerData.money.cash,
            bank = Player.PlayerData.money.bank,
            black_money = Player.PlayerData.money.crypto,
            permission = CheckPermission(Framework.Functions.GetPermission(source)) == true and 'admin' or 'citizen',
            gender = Player.PlayerData.charinfo.gender == 0 and 'male' or 'female',
            height = '190',
            birthday = parseDate(Player.PlayerData.charinfo.birthdate),
            hud = Settings.hud,
            minimap = Settings.minimap,
            pp = playerDatabase[1].pp,
            playtime = playerDatabase[1].playtime,
            bills = bills,
        }

        return PlayerDatas
    else
        local PlayerDatas = Framework.Functions.GetPlayer(source)
        local playerDatabase = playerDatabase()
        local bills = playerBills()

        PlayerDatas['hud'] = Settings.hud
        PlayerDatas['minimap'] = Settings.minimap
        PlayerDatas['pp'] = playerDatabase[1].pp
        PlayerDatas['playtime'] = playerDatabase[1].playtime
        PlayerDatas['bills'] = bills

        return PlayerDatas
    end
end

-- Create SQL record if not exist
function AddPlayerToDatabase(source)
    GetIdentifier(source)

    local playerExist = MySQL.query.await('SELECT * FROM dashboard WHERE identifier = @identifier', {['@identifier'] = identifier})
    if #playerExist == 0 then 
        local record = MySQL.insert.await('INSERT INTO dashboard (identifier, pp, playtime, settings, date) VALUES (@identifier, @pp, @playtime, @settings, @date)', {
            ['@identifier'] = identifier,  -- Identifier
            ['@pp'] = 0,  -- Premium Points
            ['@playtime'] = 0,  -- Play Time
            ['@settings'] = json.encode({hud = Config.hud, minimap = Config.minimap}), -- Settings
            ['@date'] = os.date("%x") -- Date
        })
    end

    Wait(1000)

    Settings = MySQL.query.await('SELECT settings FROM dashboard WHERE identifier = @identifier', {['@identifier'] = identifier})
    Settings = json.decode(Settings[1].settings)

    TriggerClientEvent('infinity:enableSettings', source, Settings)
    TriggerClientEvent('infinity:playerAvatar', source, getPlayerAvatar(source))

    RecordExist = true
end

-- Add Premium Points to player
function AppPPToPlayer(datas)
    if not RecordExist then 
        AddPlayerToDatabase(tonumber(datas.player))
        Wait(1000)
        MySQL.update.await('UPDATE dashboard SET pp = IF(pp + @pp >= 0, pp + @pp, 0) WHERE identifier = @identifier', {
            ['@identifier'] = identifier,
            ['@pp'] = datas.pp, 
        })
    else 
        MySQL.update.await('UPDATE dashboard SET pp = IF(pp + @pp >= 0, pp + @pp, 0) WHERE identifier = @identifier', {
            ['@identifier'] = identifier,
            ['@pp'] = datas.pp, 
        })
    end

    WebhookPP(identifier, tonumber(datas.player), datas.pp)
    TriggerClientEvent('infinity:notify', tonumber(datas.player), Languages[Config.language]['pp_added'], 'info', 5000)
    TriggerClientEvent('infinity:refreshPP', tonumber(datas.player), refreshPP(tonumber(datas.player)))
end

-- Save settings changing
function SaveSettings(source, datas)
    local newSettings = {}

    if not RecordExist then
        AddPlayerToDatabase(source)
        Wait(1000) 

        Settings = MySQL.query.await('SELECT settings FROM dashboard WHERE identifier = @identifier', {['@identifier'] = identifier})
        newSettings = json.decode(Settings[1].settings)
        newSettings[datas.settingsName] = datas.state
    else 
        newSettings = Settings
        newSettings[datas.settingsName] = datas.state
    end

    MySQL.update.await('UPDATE dashboard SET settings = @settings WHERE identifier = @identifier', {
        ['@identifier'] = identifier,
        ['@settings'] = json.encode(newSettings)
    })

    Settings = newSettings
end

-- Get Online Player Datas
function GetOnlinePlayers()
    if SelectedFramework == 'esx' then 
        OnlinePlayers = {}

        for _, playerId in ipairs(GetPlayers()) do
            local xPlayer = Framework.GetPlayerFromId(tonumber(playerId))

            table.insert(OnlinePlayers, {
                name = xPlayer.getName(),
                id = playerId,
                job = xPlayer.getJob().name,
                jobgrade_name = xPlayer.getJob().grade_name,
                permission = xPlayer.getGroup(),
            })
        end

        return OnlinePlayers
    elseif SelectedFramework == 'qbcore' then
        OnlinePlayers = {}

        for _, playerId in ipairs(GetPlayers()) do
            local Player = Framework.Functions.GetPlayer(tonumber(playerId))
            
            table.insert(OnlinePlayers, {
                name = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname,
                id = playerId,
                job = Player.PlayerData.job.name,
                jobgrade_name = Player.PlayerData.job.grade.name,
                permission = CheckPermission(Framework.Functions.GetPermission(playerId)) == true and 'admin' or 'citizen',
            })
        end

        return OnlinePlayers
    else
        OnlinePlayers = Integrates.GetAllOnlinePlayerDatas()
        
        return OnlinePlayers
    end
end

-- Get Vehicles from garage
function GetGarage()
    local vehicles = Integrates.GetPlayerGarage()

    return vehicles
end

-- Pay All Bills
function PayAllBills(source)
    local bills = Integrates.GetPlayerBills()
    local amount = 0

    for _, bill in pairs(bills) do
        amount = amount + tonumber(bill.amount)
    end

    refreshData = Integrates.PayPlayerAllBills(source, amount)
    return refreshData
end

-- Pay Current Bill
function PayCurrentBill(source, bill)
    refreshData = Integrates.PayPlayerCurrentBills(source, bill)
    return refreshData
end

-- Add Item to inventory
function AddItemToInvetory(source, itemDatas)
    if SelectedFramework == 'esx' then 
        local xPlayer = Framework.GetPlayerFromId(source)

        for _, data in ipairs(itemDatas.inventoryName) do
            xPlayer.addInventoryItem(data.name, data.amount)
            WebhookItem(identifier, itemDatas.itemType, data.name, data.amount)
        end

        MySQL.update.await('UPDATE dashboard SET pp = pp - @pp WHERE identifier = @identifier', {
            ['@identifier'] = identifier,
            ['@pp'] = itemDatas.price
        })

    elseif SelectedFramework == 'qbcore' then
        local Player = Framework.Functions.GetPlayer(source)

        for _, data in ipairs(itemDatas.inventoryName) do
            Player.Functions.AddItem(data.name, data.amount)
            WebhookItem(identifier, itemDatas.itemType, data.name, data.amount)
        end

        MySQL.update.await('UPDATE dashboard SET pp = pp - @pp WHERE identifier = @identifier', {
            ['@identifier'] = identifier,
            ['@pp'] = itemDatas.price
        })
    else
        Integrates.AddItemToPlayer(source, itemDatas)
    end
end

-- Add vehicle to owned vehicles
function AddVehicleToStorage(source, itemDatas)
    if SelectedFramework == 'esx' then
        local vehiclePlate = GeneratePlate()
        Integrates.AddVehicleToGarage(source, itemDatas, vehiclePlate)

        WebhookVehicle(identifier, itemDatas.itemType, itemDatas.inventoryName, vehiclePlate)
        TriggerClientEvent('infinity:notify', source, Languages[Config.language]['vehicle_stored'], 'info', 5000)

    elseif SelectedFramework == 'qbcore' then
        local vehiclePlate = GeneratePlate()
        Integrates.AddVehicleToGarage(source, itemDatas, vehiclePlate)

        WebhookVehicle(identifier, itemDatas.itemType, itemDatas.inventoryName, vehiclePlate)
        TriggerClientEvent('infinity:notify', source, Languages[Config.language]['vehicle_stored'], 'success', 5000)
    else
        local vehiclePlate = GeneratePlate()

        WebhookVehicle(identifier, itemDatas.itemType, itemDatas.inventoryName, vehiclePlate)
        Integrates.AddVehicleToGarage(source, itemDatas, vehiclePlate) 
    end
end

-- Render Hud
function RenderHud(state)
    if SelectedFramework == 'esx' then 
        Integrates.ChangeHUDState(state)
    elseif SelectedFramework == 'qbcore' then
        Integrates.ChangeHUDState(state)
    else
        -- Custom Framework goes here ...
    end
end

-- Generate Vehicle Plate
function GeneratePlate()
    if SelectedFramework == 'esx' then 
        local plate = ""

        local str = "abcdefghijklmnopqrstuvwxyz"
        for index = 1, 3 do
            plate = plate .. string.char(str:byte(math.random(1, #str)))
        end

        plate = plate:upper() .. " "

        for index = 1, 3 do
            plate = plate .. math.random(0, 9)
        end

        checkPlate = MySQL.query.await("SELECT plate FROM owned_vehicles WHERE plate = ?", { plate })

        if #checkPlate > 0 then
            return GeneratePlate()
        end

        return plate
    elseif SelectedFramework == 'qbcore' then
        local plate = Framework.Shared.RandomInt(1)
        .. Framework.Shared.RandomStr(2)
        .. Framework.Shared.RandomInt(3)
        .. Framework.Shared.RandomStr(2)

        local result = MySQL.scalar.await("SELECT plate FROM player_vehicles WHERE plate = ?", { plate })

        if result then
            return GeneratePlate()
        else
            return plate:upper()
        end
    else 
        return
    end
end

-- Refresh PlayTime
function RefreshPlayTime()
    MySQL.update.await('UPDATE dashboard SET playtime = playtime + @playtime WHERE identifier = @identifier', {
        ['@identifier'] = identifier,
        ['@playtime'] = Config.refreshPlayTime,
    })
end
Languages = {
    ['en'] = {
        -- Main Page
        ['page_main'] = 'Player Dashboard',
        ['welcome'] = 'Welcome Back',
        ['players'] = 'Players',
        ['online'] = 'Online',
        ['section_characterinfo'] = 'Character Main Info',
        ['birthday'] = 'Player Birthday',
        ['year'] = 'Year',
        ['month'] = 'Month',
        ['day'] = 'Day',
        ['hight'] = 'Player Hight',
        ['gender'] = 'Player Gender',
        ['playerID'] = 'Player ID',
        ['fullname'] = 'Full Name',
        ['playerjob'] = 'Player Job',
        ['section_jobinfo'] = 'Character Job Info',
        ['playerjob_grade'] = 'Player Grade',
        ['servertime'] = 'Daily Playtime',
        ['time'] = 'Hour',
        ['section_founds'] = 'Character Funds',
        ['cash'] = 'Now in cash',
        ['bank'] = 'Now in bank',
        ['black_money'] = 'Black Money',
        ['section_playerinfo'] = 'More info about player',
        ['premium_points'] = "You're premium points",
        ['pemium_points_wallet'] = 'Premium points in your wallet',
        ['premium_points_button'] = 'Spend you points',
        ['points_control_button'] = 'Points Control',
        ['points_control_permission'] = '| Available |',
        ['points_control_not_available'] = '| Not available |',
        ['salary'] = 'Your salary',
        ['salary_text'] = 'The salary you get from this job',
        ['permission'] = 'Your permission',
        ['permission_text'] = 'Use your permission responsibly',
        ['bills'] = 'Pending bills',
        ['bills_text'] = 'Your current bills!',
        ['pay_bills'] = 'Pay your bills',
        ['no_pay_bills'] = 'No bills pending!',
        ['bills_cannot'] = "Can't pay all bills!",
        ['check_bills'] = 'Check your bills history',
        ['section_news'] = 'Server News',
        ['coming_soon'] = 'Coming Soon',
        ['update'] = 'Next Update',

        -- Settings Page
        ['settings'] = 'Dashboard Settings',
        ['exit'] = 'Press to exit',
        ['hud'] = 'Hud Control',
        ['minimap'] = 'Minimap Control',
        ['on'] = 'Turned On',
        ['off'] = 'Turned Off',

        -- Premiun Points Control Page
        ['points_control'] = 'Premium Points Control',
        ['login'] = 'Login as',
        ['points_amount'] = 'Amount of premium points',
        ['points_text'] = 'Player ID which u want to give points',
        ['points_add'] = 'Add',
        ['no_player'] = 'No player selected!',

        -- Bills Page
        ['bills_history'] = 'Bills history menu',
        ['bills_name'] = 'Bills Name',
        ['bills_cost'] = 'Amount',
        ['bills_status'] = 'Status',
        ['bills_pay'] = 'Pay Bill',
        ['bills_pay_button'] = 'Pay',
        ['bills_pay_button_disabled'] = 'Disabled',
        ['bills_available'] = 'Available',
        ['bills_unavailable'] = 'Unavailable',
        ['no_bills'] = 'You currently dont have bills!',
        ['areyou_sure_pay'] = 'Are you sure you want to pay all your bills?',
        ['yes'] = 'Yes',
        ['no'] = 'No',

        -- Online Players Page
        ['page_players'] = 'Online Players',
        ['onlineplayer_title']  = 'Online players list',
        ['onlinestaff_title']  = 'Online staff members list',
        ['online_permission']  = 'Permission',
        ['search']  = 'Search',
        ['search_players']  = 'Search between players',
        ['search_staffs']  = 'Search between staffs',
        ['not_found_player'] = 'No player found',
        ['not_found_staff'] = 'No staff found',

        -- Vehicles Page
        ['page_vehicles'] = 'Vehicles',
        ['impound'] = 'Impound',
        ['garage'] = 'Garage',
        ['driving'] = 'Driving',
        ['fuel_tank'] = 'Fuel Tank',
        ['engine'] = 'Engine Damage',
        ['body'] = 'Body Damage',
        ['search_vehicles'] = 'Search between cars',
        ['not_found_vehicle'] = 'No car found',
        ['not_vehicle_owned'] = 'No car owned',
        ['no_brand'] = 'No Brand',
        
        -- Premium Shop Page
        ['page_shop'] = 'Premium Shop',
        ['title_food'] = 'Food',
        ['title_vehicles'] = 'Vehicles',
        ['title_weapons'] = 'Weapons',
        ['coins'] = 'Coins',
        ['areyou_sure_buy'] = 'Are you sure you want to buy this?',
        ['item_name'] = 'Item Name',
        ['item_type'] = 'Item Type',
        ['item_description'] = 'Item Description',
        ['buy_food'] = 'Buy Food',
        ['buy_vehicle'] = 'Buy Vehicle',
        ['buy_weapon'] = 'Buy Weapon',
        ['test_vehicle'] = 'Test Vehicle',
        ['unavailable'] = 'Not enough points!',
        ['cancel'] = 'Cancel',

        -- Notification
        ['pp_added'] = 'Successfully added premium points!',
        ['error_billing'] = 'You dont have enough money!',
        ['vehicle_stored'] = 'Successfully owned vehicle!',
    }
}
-- Only 4 news
News = {
    ['new1'] = {
        ['updateVersion'] = '1.00',
        ['newText'] = {
            "Lorem ipsum dolor sit amet consectetur adipisicing elit." ..
            "Nemo necessitatibus iure, perferendis asperiores sequi culpa atque modi" ..
            "aspernatur exercitationem voluptas labore quae est reiciendis quo officiis" ..
            "pariatur harum natus? Iusto!"
        }
    },
    ['new2'] = {
        ['updateVersion'] = '1.01',
        ['newText'] = {
            "Lorem ipsum dolor sit amet consectetur adipisicing elit." ..
            "Nemo necessitatibus iure, perferendis asperiores sequi culpa atque modi" ..
            "aspernatur exercitationem voluptas labore quae est reiciendis quo officiis" ..
            "pariatur harum natus? Iusto!"
        }
    },
    ['new3'] = {
        ['updateVersion'] = '1.02',
        ['newText'] = {
            "Lorem ipsum dolor sit amet consectetur adipisicing elit." ..
            "Nemo necessitatibus iure, perferendis asperiores sequi culpa atque modi" ..
            "aspernatur exercitationem voluptas labore quae est reiciendis quo officiis" ..
            "pariatur harum natus? Iusto!"
        }
    },
    ['new4'] = {
        ['updateVersion'] = '1.03',
        ['newText'] = {
            "Lorem ipsum dolor sit amet consectetur adipisicing elit." ..
            "Nemo necessitatibus iure, perferendis asperiores sequi culpa atque modi" ..
            "aspernatur exercitationem voluptas labore quae est reiciendis quo officiis" ..
            "pariatur harum natus? Iusto!"
        }
    }
}
-- Add items to premium shop (example):
-- {
--      ['name'] = The item display name,
--      ['itemType'] = The item display type (optional -> leave ''),
--      ['inventory_name'] = The name of the item in the inventory (if you bought the item it will give you this),
--      ['description'] = A short description,
--      ['price'] = The item price,
--      ['imgCover'] = url or shop/item_name.png, -- Cover image about (16:9 ratio)
--      ['imgIcon'] = url or shop/item_name.png, -- Icon image about (3:4 ratio)
-- }

PremiumShop = {
    ['food'] = {
        {
            name = 'Hamburger',
            itemType = 'Fast Food',
            inventory_name = {
                {
                    name = 'burger',
                    amount = 3,
                },
            },
            description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
            price = 20,
            imgCover = 'shop/hamburgerCover.png',
            imgIcon = 'shop/hamburgerIcon.png',
        },
    },
    ['vehicles'] = {
        {
            name = 'Adder',
            itemType = 'Sport Car',
            inventory_name = 'adder', -- Model name
            description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
            price = 500,
            imgCover = 'shop/adderCover.png',
            imgIcon = 'shop/adderIcon.png',
        },
    },
    ['weapons'] = {
        {
            name = 'M4a4',
            itemType = 'Assault rifle',
            inventory_name = {
                {
                    name = 'weapon_carbinerifle',
                    amount = 1,
                },
                {
                    name = 'ammo-rifle2',
                    amount = 100,
                }
            },
            description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
            price = 250,
            imgCover = 'shop/m4Cover.png',
            imgIcon = 'shop/m4Icon.png',
        },
    }
}

-- Models image
Models = {
    [-1216765807] = {
        name = 'adder',
        img = 'cars/adder.jpg',
    },
}

PreviousInstallationNextWebhooks

Last updated 8 hours ago

Was this helpful?