Ejiy / jl-laptop

Laptop script for fivem, that has boosting, darkweb, and bennys shop apps
https://justlazzy.gitbook.io/home/free-resources/jl-laptop
GNU Lesser General Public License v2.1
107 stars 66 forks source link

No contracts after joining queue. #42

Closed VinnyTheLegend closed 6 months ago

VinnyTheLegend commented 1 year ago

On a fresh qb-core server. Have the laptop itself functioning, and am able to join the Boost queue, however I never receive a contract. I've added 2 cars to each tier and have used a print statement to confirm the "queue loop" is indeed running. the /giveboost command doesnt work either when I do:

/giveboost 1 D blista boosting

VinnyTheLegend commented 1 year ago

Got it working after rebuilding the database tables, however now every boost has an invalid expiration date.

Ghostttie commented 1 year ago

Got it working after rebuilding the database tables, however now every boost has an invalid expiration date.

Goto server/boosting.lua and search for function GetHoursFromNow(hours) and replace both GetHoursFromNow & GetCurrentTime with the following

function GetHoursFromNow(hours)
    if Config.Linux then
        return os.date("%Y-%m-%d %H:%M", os.time() + hours * 60 * 60)
    else
        return os.date("%Y-%m-%d %H:%M", os.time() + hours * 60 * 60)
    end
end

function GetCurrentTime()
    if Config.Linux then
        return os.date("%Y-%m-%d %H:%M", os.time())
    else
        return os.date("%Y-%m-%d %H:%M", os.time())
    end
end
Ghostttie commented 1 year ago

Also if you don't get any contracts when in the queue make sure you have added vehicles to the table below (server/boosting.lua)

local cars = {
    ["D"] = {},
    ["C"] = {},
    ["B"] = {},
    ["A"] = {},
    ["A+"] = {},
    ["S"] = {},
    ["S+"] = {},
}
DJ5milez commented 1 year ago

Also if you don't get any contracts when in the queue make sure you have added vehicles to the table below (server/boosting.lua)

local cars = {
    ["D"] = {},
    ["C"] = {},
    ["B"] = {},
    ["A"] = {},
    ["A+"] = {},
    ["S"] = {},
    ["S+"] = {},
}

Can you provide an example of how this table should look?

DJ5milez commented 1 year ago

like this for example?

local cars = { ["D"] = { {['model'] = 'blista', ['name'] = 'Blista', ['brand'] = 'Dinka', ['price'] = 13000, ['categoryLabel'] = 'Compacts', ['shop'] = 'pdm', ["tier"] = "D"}, {['model'] = 'brioso', ['name'] = 'Brioso R/A', ['brand'] = 'Grotti', ['price'] = 20000, ['categoryLabel'] = 'Compacts', ['shop'] = 'pdm', ["tier"] = "D"},