QB-Core

The installation of the script is extremely easy

Here are the steps to install the script

Config = {}

Config.Blips = true

Config.AllowVehicleReturn = true -- Enable or disable returning rented vehicles
Config.ReturnRewardEnabled = true -- Enable or disable return rewards

Config.RentalLocations = {
    {
        coords = vec3(-1506.7657, -439.9843, 35.5919),
        debug = false,
        spawnCoords = vector4(-1510.2772, -431.7015, 35.4421, 82.3194),
        entityType = "prop", -- Options: "prop", "ped"
        entityModel = "lmn_car_rental_call", -- Model for ped or prop
        heading = 120.0, -- Heading for spawned entity
        blip = {
            enabled = true, -- Enable/disable this blip individually
            sprite = 225, 
            color = 38, 
            scale = 0.8,
            name = "Car Rental"
        },
        vehicles = {
            { displayName = "Faggio", spawnName = "faggio", type = "Moped", price = 50, returnReward = 25 },
            { displayName = "Blista", spawnName = "blista", type = "Compact", price = 300, returnReward = 25 },
            { displayName = "Caracara 2", spawnName = "caracara2", type = "SUV", price = 300, returnReward = 25 },
            { displayName = "Caracara", spawnName = "caracara", type = "SUV", price = 300, returnReward = 25 },
            { displayName = "Sultan RS", spawnName = "sultanrs", type = "Sports", price = 500, returnReward = 25 },
            { displayName = "Sultan 2", spawnName = "sultan2", type = "Sports", price = 500, returnReward = 25 },
            { displayName = "Banshee", spawnName = "banshee", type = "Super", price = 800, returnReward = 25 },
        }
    }, 
}




/*$$$$$ /$$   /$$ /$$    /$$ /$$$$$$$$ /$$   /$$ /$$$$$$$$ /$$$$$$  /$$$$$$$  /$$     /$$        /$$$$$$  /$$     /$$ /$$$$$$  /$$$$$$$$ /$$$$$$$$ /$$      /$$
|_  $$_/| $$$ | $$| $$   | $$| $$_____/| $$$ | $$|__  $$__//$$__  $$| $$__  $$|  $$   /$$/       /$$__  $$|  $$   /$$//$$__  $$|__  $$__/| $$_____/| $$$    /$$$
  | $$  | $$$$| $$| $$   | $$| $$      | $$$$| $$   | $$  | $$  \ $$| $$  \ $$ \  $$ /$$/       | $$  \__/ \  $$ /$$/| $$  \__/   | $$   | $$      | $$$$  /$$$$
  | $$  | $$ $$ $$|  $$ / $$/| $$$$$   | $$ $$ $$   | $$  | $$  | $$| $$$$$$$/  \  $$$$/        |  $$$$$$   \  $$$$/ |  $$$$$$    | $$   | $$$$$   | $$ $$/$$ $$
  | $$  | $$  $$$$ \  $$ $$/ | $$__/   | $$  $$$$   | $$  | $$  | $$| $$__  $$   \  $$/          \____  $$   \  $$/   \____  $$   | $$   | $$__/   | $$  $$$| $$
  | $$  | $$\  $$$  \  $$$/  | $$      | $$\  $$$   | $$  | $$  | $$| $$  \ $$    | $$           /$$  \ $$    | $$    /$$  \ $$   | $$   | $$      | $$\  $ | $$
 /$$$$$$| $$ \  $$   \  $/   | $$$$$$$$| $$ \  $$   | $$  |  $$$$$$/| $$  | $$    | $$          |  $$$$$$/    | $$   |  $$$$$$/   | $$   | $$$$$$$$| $$ \/  | $$
|______/|__/  \__/    \_/    |________/|__/  \__/   |__/   \______/ |__/  |__/    |__/           \______/     |__/    \______/    |__/   |________/|__/     |_*/


Config.GiveRentalPaperwork = true -- Enable or disable rental paperwork item
Config.InventorySystem = "qb-inventory" -- Options: "ox_inventory", "qb-inventory", "custom"

-- using "custom"
Config.CustomGiveItem = function(playerId)

end



/*$$$$$$$ /$$$$$$  /$$$$$$$   /$$$$$$  /$$$$$$$$ /$$$$$$$$        /$$$$$$  /$$     /$$ /$$$$$$  /$$$$$$$$ /$$$$$$$$ /$$      /$$
|__  $$__//$$__  $$| $$__  $$ /$$__  $$| $$_____/|__  $$__/       /$$__  $$|  $$   /$$//$$__  $$|__  $$__/| $$_____/| $$$    /$$$
   | $$  | $$  \ $$| $$  \ $$| $$  \__/| $$         | $$         | $$  \__/ \  $$ /$$/| $$  \__/   | $$   | $$      | $$$$  /$$$$
   | $$  | $$$$$$$$| $$$$$$$/| $$ /$$$$| $$$$$      | $$         |  $$$$$$   \  $$$$/ |  $$$$$$    | $$   | $$$$$   | $$ $$/$$ $$
   | $$  | $$__  $$| $$__  $$| $$|_  $$| $$__/      | $$          \____  $$   \  $$/   \____  $$   | $$   | $$__/   | $$  $$$| $$
   | $$  | $$  | $$| $$  \ $$| $$  \ $$| $$         | $$          /$$  \ $$    | $$    /$$  \ $$   | $$   | $$      | $$\  $ | $$
   | $$  | $$  | $$| $$  | $$|  $$$$$$/| $$$$$$$$   | $$         |  $$$$$$/    | $$   |  $$$$$$/   | $$   | $$$$$$$$| $$ \/  | $$
   |__/  |__/  |__/|__/  |__/ \______/ |________/   |__/          \______/     |__/    \______/    |__/   |________/|__/     |_*/


Config.Interaction = {
    Type = "qb-target", -- Options: "ox_target", "qb-target", "3dtext"
    Icon = "fa-solid fa-car", 
    -- 3D Text Settings
    TextDistance = 2.0, -- Distance to show 3D text
    Key = "E", -- Key to interact with 3D text
}




/*$$$$$$$ /$$   /$$ /$$$$$$$$ /$$              /$$$$$$  /$$     /$$ /$$$$$$  /$$$$$$$$ /$$$$$$$$ /$$      /$$
| $$_____/| $$  | $$| $$_____/| $$             /$$__  $$|  $$   /$$//$$__  $$|__  $$__/| $$_____/| $$$    /$$$
| $$      | $$  | $$| $$      | $$            | $$  \__/ \  $$ /$$/| $$  \__/   | $$   | $$      | $$$$  /$$$$
| $$$$$   | $$  | $$| $$$$$   | $$            |  $$$$$$   \  $$$$/ |  $$$$$$    | $$   | $$$$$   | $$ $$/$$ $$
| $$__/   | $$  | $$| $$__/   | $$             \____  $$   \  $$/   \____  $$   | $$   | $$__/   | $$  $$$| $$
| $$      | $$  | $$| $$      | $$             /$$  \ $$    | $$    /$$  \ $$   | $$   | $$      | $$\  $ | $$
| $$      |  $$$$$$/| $$$$$$$$| $$$$$$$$      |  $$$$$$/    | $$   |  $$$$$$/   | $$   | $$$$$$$$| $$ \/  | $$
|__/       \______/ |________/|________/       \______/     |__/    \______/    |__/   |________/|__/     |_*/


Config.UseFuel = true -- Enable or disable fuel system
Config.FuelLevel = 100 -- 0-100
Config.BoatNoFuel = true -- If true, boats won't consume fuel




/*$$   /$$ /$$$$$$$$ /$$     /$$        /$$$$$$  /$$     /$$ /$$$$$$  /$$$$$$$$ /$$$$$$$$ /$$      /$$
| $$  /$$/| $$_____/|  $$   /$$/       /$$__  $$|  $$   /$$//$$__  $$|__  $$__/| $$_____/| $$$    /$$$
| $$ /$$/ | $$       \  $$ /$$/       | $$  \__/ \  $$ /$$/| $$  \__/   | $$   | $$      | $$$$  /$$$$
| $$$$$/  | $$$$$     \  $$$$/        |  $$$$$$   \  $$$$/ |  $$$$$$    | $$   | $$$$$   | $$ $$/$$ $$
| $$  $$  | $$__/      \  $$/          \____  $$   \  $$/   \____  $$   | $$   | $$__/   | $$  $$$| $$
| $$\  $$ | $$          | $$           /$$  \ $$    | $$    /$$  \ $$   | $$   | $$      | $$\  $ | $$
| $$ \  $$| $$$$$$$$    | $$          |  $$$$$$/    | $$   |  $$$$$$/   | $$   | $$$$$$$$| $$ \/  | $$
|__/  \__/|________/    |__/           \______/     |__/    \______/    |__/   |________/|__/     |_*/
    

Config.KeySystem = "qb-vehiclekeys" -- Options: "qbx_vehiclekeys", "vehiclekeys", "qs-vehiclekeys", "qb-vehiclekeys", "custom"
                                     -- NOTICE: The QB-Core version is tested only with qb-vehiclekeys, as I don’t have access 
                                     -- to other developers resources. 
                                     -- You can always add exports in sv-editable.lua or use a custom solution.

-- if Config.KeySystem is "custom"
Config.CustomGiveKeys = function(playerId, vehicle)
    -- Write your code
end
        



/*$$   /$$  /$$$$$$  /$$$$$$$$ /$$$$$$ /$$$$$$$$ /$$     /$$        /$$$$$$  /$$     /$$ /$$$$$$  /$$$$$$$$ /$$$$$$$$ /$$      /$$
| $$$ | $$ /$$__  $$|__  $$__/|_  $$_/| $$_____/|  $$   /$$/       /$$__  $$|  $$   /$$//$$__  $$|__  $$__/| $$_____/| $$$    /$$$
| $$$$| $$| $$  \ $$   | $$     | $$  | $$       \  $$ /$$/       | $$  \__/ \  $$ /$$/| $$  \__/   | $$   | $$      | $$$$  /$$$$
| $$ $$ $$| $$  | $$   | $$     | $$  | $$$$$     \  $$$$/        |  $$$$$$   \  $$$$/ |  $$$$$$    | $$   | $$$$$   | $$ $$/$$ $$
| $$  $$$$| $$  | $$   | $$     | $$  | $$__/      \  $$/          \____  $$   \  $$/   \____  $$   | $$   | $$__/   | $$  $$$| $$
| $$\  $$$| $$  | $$   | $$     | $$  | $$          | $$           /$$  \ $$    | $$    /$$  \ $$   | $$   | $$      | $$\  $ | $$
| $$ \  $$|  $$$$$$/   | $$    /$$$$$$| $$          | $$          |  $$$$$$/    | $$   |  $$$$$$/   | $$   | $$$$$$$$| $$ \/  | $$
|__/  \__/ \______/    |__/   |______/|__/          |__/           \______/     |__/    \______/    |__/   |________/|__/     |_*/


function SendTextMessage(msg)
 	SetNotificationTextEntry('STRING')
	AddTextComponentString(msg)
	DrawNotification(0,1)

	--exports['okokNotify']:Alert('ADMIN PANEL', msg, 5000, 'info')
	--exports['mythic_notify']:SendAlert('inform', msg)
	--ESX.ShowNotification(msg)
	--lib.notify({title = 'Info', description = msg, type = 'info'})
end




/*$$$$$$$ /$$$$$$$   /$$$$$$  /$$   /$$  /$$$$$$  /$$        /$$$$$$  /$$$$$$$$ /$$$$$$  /$$$$$$  /$$   /$$
|__  $$__/| $$__  $$ /$$__  $$| $$$ | $$ /$$__  $$| $$       /$$__  $$|__  $$__/|_  $$_/ /$$__  $$| $$$ | $$
   | $$   | $$  \ $$| $$  \ $$| $$$$| $$| $$  \__/| $$      | $$  \ $$   | $$     | $$  | $$  \ $$| $$$$| $$
   | $$   | $$$$$$$/| $$$$$$$$| $$ $$ $$|  $$$$$$ | $$      | $$$$$$$$   | $$     | $$  | $$  | $$| $$ $$ $$
   | $$   | $$__  $$| $$__  $$| $$  $$$$ \____  $$| $$      | $$__  $$   | $$     | $$  | $$  | $$| $$  $$$$
   | $$   | $$  \ $$| $$  | $$| $$\  $$$ /$$  \ $$| $$      | $$  | $$   | $$     | $$  | $$  | $$| $$\  $$$
   | $$   | $$  | $$| $$  | $$| $$ \  $$|  $$$$$$/| $$$$$$$$| $$  | $$   | $$    /$$$$$$|  $$$$$$/| $$ \  $$
   |__/   |__/  |__/|__/  |__/|__/  \__/ \______/ |________/|__/  |__/   |__/   |______/ \______/ |__/  \_*/


Config.Text = {

	['target_lable'] = 'Open Rent',
    ['target_lable_r'] = 'Return Vehicle',
    ['target_lable_3dtext'] = '[E] Rent / [R] Return',
    ['car_rented'] = 'You have successfully rented a vehicle.',
    ['no_money'] = 'You don\'t have enough money!',
    ['s_returned'] = 'Vehicle returned successfully!',
    ['w_returned'] = 'This is not your rented vehicle!',
    ['e_returned'] = 'You are not in a vehicle!',
    ['d_returned'] = 'Returning vehicles is disabled.',
    ['rew_returned'] = 'You returned your vehicle and received $',
    
}

Last updated