vImageCreator icon indicating copy to clipboard operation
vImageCreator copied to clipboard

No cars show up when i go to take a pic i use qbcore

Open cktohigh opened this issue 2 years ago • 8 comments

image 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 }

cktohigh avatar May 17 '22 05:05 cktohigh

I got the same issue, im using the latest qb-core

INDOmonyet avatar May 20 '22 19:05 INDOmonyet

same

forbest avatar May 25 '22 04:05 forbest

Same

Mac-Womack avatar Aug 09 '22 04:08 Mac-Womack

Anyone Find A Fix Yet

Mac-Womack avatar Aug 09 '22 04:08 Mac-Womack

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

Bama94 avatar Nov 11 '22 06:11 Bama94

And if im using ESX?=

Gameadictive avatar Apr 07 '23 16:04 Gameadictive

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) `

nagy1991 avatar Jul 22 '23 00:07 nagy1991

for esx pliz ? image

Arkalys59 avatar Jul 28 '23 12:07 Arkalys59