Open cktohigh opened 2 years ago
I got the same issue, im using the latest qb-core
same
Same
Anyone Find A Fix Yet
TO GET THIS TO WORK!
Open config.lua and under Config = {} add QBCore = exports['qb-core']:GetCoreObject()
then for the SQLVehicleTable make it look like this: Config.SqlVehicleTable = QBCore.Shared.Vehicles or {} -- example qbcore shared vehicle
Then go into the server.lua and add QBCore = exports['qb-core']:GetCoreObject() to the top
And if im using ESX?=
TO GET THIS TO WORK!
Open config.lua and under Config = {} add QBCore = exports['qb-core']:GetCoreObject()
then for the SQLVehicleTable make it look like this: Config.SqlVehicleTable = QBCore.Shared.Vehicles or {} -- example qbcore shared vehicle
Then go into the server.lua and add QBCore = exports['qb-core']:GetCoreObject() to the top
Hello, Bama94 can i help me ?
`--- Config = {} QBCore = exports['qb-core']:GetCoreObject() Config.DiscordWebHook = 'xxxxxxxxxxxxxxxxxxxxxxx' Config.save = 'json' Config.vehicle_table = 'vehicles' Config.useSQLvehicle = false Config.SqlVehicleTable = QBCore.Shared.Vehicles
-- Custom Category Config.Category = 'all'
-- Permission Config.owners = { ['fivem:xxxxxxxxx'] = true, }`
`QBCore = exports['qb-core']:GetCoreObject() local resultVehicles local thumbs = {}
RegisterCommand('getperms', function(source, args, rawCommand) for i = 0 , GetNumPlayerIdentifiers(source) do if GetPlayerIdentifier(source,i) and Config.owners[GetPlayerIdentifier(source,i)] then local ply = Player(source).state ply.screenshotperms = true print("Player ID: "..source.." Granted Permission to use Screenshot Vehicle \n Commands: \n Start Screen Shot Vehicle /startscreenshot \n Reset screenshot index (last vehicle number for continuation purpose) /resetscreenshot") end end end)
Citizen.CreateThread(function() if Config.save == 'kvp' then thumbs = json.decode(GetResourceKvpString('thumbnails') or '[]') or {} else thumbs = json.decode(LoadResourceFile('vImageCreator', 'thumbnails.json') or '[]') or {} end if Config.useSQLvehicle then resultVehicles = MySQL.Sync.fetchAll('SELECT * FROM '..Config.vehicle_table) else resultVehicles = Config.SqlVehicleTable end local temp = {} if Config.Category ~= 'all' then for k,v in pairs(resultVehicles) do if v.category == Config.Category then table.insert(temp,v) end end else temp = resultVehicles end GlobalState.VehiclesFromDB = temp local thumbtemp = {} local c = 0 for k,v in pairs(thumbs) do local k = tostring(k) thumbtemp[k] = v c = c + 1 end GlobalState.VehicleImages = thumbtemp end)
RegisterNetEvent("renzu_vehthumb:save") AddEventHandler("renzu_vehthumb:save", function(data) local modelhash = GetHashKey(data.model) thumbs[tostring(modelhash)] = data.img if Config.save == 'kvp' then SetResourceKvp('thumbnails',json.encode(thumbs)) else SaveResourceFile("vImageCreator", "thumbnails.json", json.encode(thumbs), -1) end GlobalState.VehicleImages = thumbs end) `
for esx pliz ?
my config file
Config = {} Config.DiscordWebHook = 'https://discord.com/api/webhooks/975926167754407957/1Rx3IpnFIApwjdi95c-aW8XDytIwtWSKcUzlxbUkVF7rFkpjZ4yHaYrEWKDQOMh03Qd4' Config.save = 'json' -- kvp, json Config.vehicle_table = '' -- vehicle table must have model column (name not hash) Config.useSQLvehicle = false -- use mysql async to fetch vehicle table else SqlVehicleTable will use Config.SqlVehicleTable = QBCore and QBCore.Shared and QBCore.Shared.Vehicles and QBCore.Shared.Vehicles or {} -- example qbcore shared vehicle
-- Custom Category Config.Category = 'all' -- select a custom category | set this to 'all' if you want to Screenshot all vehicle categories
-- Permission Config.owners = { ['license:535128e884eec5865f4416a8027d593543e2c8b0'] = true, --add more here }