Skip to content
This repository has been archived by the owner on Jul 24, 2022. It is now read-only.

JustLazzy/jl-carboost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THIS REPO IS NOW ARCHIVED | ITS BUGGY

ITS MEAN NO SUPPORT FOR THIS SCRIPT ANYMORE, WILL MOVE TO OTHER RESOURCE

JustLazzy Carboost

a carboosting script with laptop ui and bennys app

Join my discord server here

Dependencies

  1. boostinghack from Lionh34rt here
  2. Polyzone
  3. qb-target
  4. qb-phone

How to install

  1. Import db.sql to your database

  2. Go to your qb-core/server/player.lua, and find QBCore.Player.CheckPlayerData function and paste this snippets

    -- Car Boosting
    PlayerData.metadata['carboostclass'] = PlayerData.metadata['carboostclass'] or 'D'
    PlayerData.metadata['carboostrep'] = PlayerData.metadata['carboostrep'] or 0
    PlayerData.metadata['laptopdata'] = PlayerData.metadata['laptopdata'] or {
        wallpaper = 'default',
        apps = {}
    }
  1. Go to your qb-core/shared/items.lua, and add this
-- Hacking
['hacking_device']			  = {['name'] = "hacking_device",					['label'] = "Hacking device",			['weight'] = 500,		['type'] = 'item', 		['image'] = 'hacking_device.png',			['unique'] = true,		['useable']	= true,		['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = "A multi purpose hacking device"},

-- Fake Plate
['fake_plate']					 = {['name'] = 'fake_plate',					['label'] = "Plate Number",				['weight'] = 500,		['type'] = 'item',		['image'] = 'fake_plate.png',			['unique'] = true,		['useable'] = true,		['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = "A fake plate?"},

Find laptop and change unique and usage to true,

['unique'] = true, 		['useable'] = true,
  1. Go to your qb-radialmenu/config.lua and add this on policejob, probably line 711
        {
            id = 'checkvin',
            title = 'Check VIN',
            icon = 'search',
            type = 'client',
            event = 'jl-carboost:client:checkvin',
            shouldClose = true
        }
  1. Go to your qb-vehicleshop/server.lua find this event qb-vehicleshop:server:buyShowroomVehicle, replace that with
RegisterNetEvent('qb-vehicleshop:server:buyShowroomVehicle', function(vehicle)
    local src = source
    local vehicle = vehicle.buyVehicle
    local pData = QBCore.Functions.GetPlayer(src)
    local cid = pData.PlayerData.citizenid
    local cash = pData.PlayerData.money['cash']
    local bank = pData.PlayerData.money['bank']
    local vehiclePrice = QBCore.Shared.Vehicles[vehicle]['price']
    local plate = GeneratePlate()
    if cash > vehiclePrice then
        MySQL.Async.insert('INSERT INTO player_vehicles (license, citizenid, vehicle, hash, mods, plate, state) VALUES (?, ?, ?, ?, ?, ?, ?)', {
            pData.PlayerData.license,
            cid,
            vehicle,
            GetHashKey(vehicle),
            '{}',
            plate,
            0
        })
        TriggerClientEvent('QBCore:Notify', src, 'Congratulations on your purchase!', 'success')
        TriggerClientEvent('qb-vehicleshop:client:buyShowroomVehicle', src, vehicle, plate)
        pData.Functions.RemoveMoney('cash', vehiclePrice, 'vehicle-bought-in-showroom')
        exports['jl-carboost']:AddVIN(plate)
    elseif bank > vehiclePrice then
        MySQL.Async.insert('INSERT INTO player_vehicles (license, citizenid, vehicle, hash, mods, plate, state) VALUES (?, ?, ?, ?, ?, ?, ?)', {
            pData.PlayerData.license,
            cid,
            vehicle,
            GetHashKey(vehicle),
            '{}',
            plate,
            0
        })
        TriggerClientEvent('QBCore:Notify', src, 'Congratulations on your purchase!', 'success')
        TriggerClientEvent('qb-vehicleshop:client:buyShowroomVehicle', src, vehicle, plate)
        pData.Functions.RemoveMoney('bank', vehiclePrice, 'vehicle-bought-in-showroom')
        exports['jl-carboost']:AddVIN(plate)
    else
        TriggerClientEvent('QBCore:Notify', src, 'Not enough money', 'error')
    end
end)

And you're done

Configuration

Configuring the bennys shop

Config.BennysSell = {
    ["brake1"] = {
        item = 'brake1', --Item name on your shared/items.lua
        image = 'brake_parts_b.png', --Item image
        price = 1000, --Item price
        stock = 50 -- Item stock
    },
}

MAKE SURE YOUR ITEM IS EXIST ON THE SHARED ITEM

Commands

Name Description Permission
settier Set Boosting Tier Admin
giveContract Give contract to a specific player Admin

Preview

Bennys App

Boosting App

Setting

Special Thanks

Thanks to @kentainfr for the amazing icon!


If you love my work, you can buy me a coffee

Shield: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0

About

Fivem car boosting script with laptop ui

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published