Installation

Welcome to the Quasar Vehicle Keys installation guide, here you can learn how to completely install our asset, following each step we will achieve a clean and fluid installation where you will not find any problems, as long as the documentation has been completed in full.

For compatibility and security reasons, we request that WinSCP be used mandatorily to manage the script files instead of FileZilla. WinSCP offers greater stability and better integration with our work environment, ensuring a more efficient handling of assets and minimizing issues related to file transfers. We appreciate your cooperation in ensuring a better experience for everyone.

If you do not have programming experience, we recommend that you read each step completely without skipping any lines, since all documentation is important and should not be ignored under any circumstances. If you have a trusted developer, you can install this quickly, easily and safely if you complete this documentation step by step.

If at the end of this documentation you still have any problems, review each step again, after having checked that everything is correct, you can obtain more information about common errors in the Common Problems section within this same documentation to seek help independently.


Asset download

To find the asset, you must have made the purchase using your own keymaster account. Otherwise, you can use the transfer system to move the asset to a different keymaster account.

If you need to make an update you must also do this step again, download the asset and you will get the complete update.

Once the purchase is made on our official website, you will receive your asset directly in your keymaster, in your own panel you can download the asset and install it following the following documentation.

If you have more problems regarding Fivem Escrow, accounts or asset startup errors you can go here and see if any of them match your case, since Escrow requires some basic things for its operation, such as your keymaster account, your licensekey , etc.

FiveM Asset Escrow System

Asset dependencies

This asset has some dependencies that are completely mandatory and important for the operation of the asset. If you do not have these dependencies, your asset will probably start and have some error or message in its command console.


Asset positioning

Correctly position the assets by following this step, if something goes wrong you will probably get errors about exports not found, do not skip this step.

For the correct execution of the asset, we will put the asset and its dependencies inside a folder called [vehiclekeys], then we will execute it completely using ensure as in the example.

The starting order is not very important in this asset, but just in case we will leave the basics so as not to receive general errors when using it. Always respect the framework and inventory above this asset.

-- First we will start the cores, never below
ensure es_extended or qb-core

-- The inventory should be executed above
ensure [inventory]

-- The vehiclekeys will go under the framework and inventory
ensure [vehiclekeys]

-- The garage always under the vehiclekeys
ensure [garages]

-- Start your others below vehiclekeys
ensure [other]

Compatible Inventories

This system works with a limited series of inventories, as it requires the use of metadata for the items, if your inventory is not here, obtain one of these or ask your developer to make compatibility with your system as long as it meets the requirements.

The list of compatible inventories that you will see below are those that are configured by default, if you use another, you can use the configurable files to make it compatible.


Items

This system includes areas with drug collection, which will give us certain items. Here we will add the items to our inventory to be able to execute this function.

Items for qs-inventory
['vehiclekeys'] = {
    ['name'] = 'vehiclekeys',
    ['label'] = 'Vehicle Keys',
    ['weight'] = 50,
    ['type'] = 'item',
    ['image'] = 'vehiclekeys.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'A small and sweet casting.'
},
['plate'] = {
    ['name'] = 'plate',
    ['label'] = 'Plate',
    ['weight'] = 50,
    ['type'] = 'item',
    ['image'] = 'plate.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'A plate.'
},
['carlockpick'] = {
    ['name'] = 'carlockpick',
    ['label'] = 'Carlockpick',
    ['weight'] = 50,
    ['type'] = 'item',
    ['image'] = 'carlockpick.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'A Lockpick.'
},
['caradvancedlockpick'] = {
    ['name'] = 'caradvancedlockpick',
    ['label'] = 'Car Advanced Lockpick',
    ['weight'] = 500,
    ['type'] = 'item',
    ['image'] = 'advancedlockpick.png',
    ['unique'] = false,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'If you lose your keys a lot this is very useful... Also useful to open your beers'
},

You can add this snippet in config/metadata.js to see the item information, but make sure it is not already added.

} else if (itemData.name == "vehiclekeys") {
    $(".item-info-title").html("<p>" + itemData.label + "</p>");
    $(".item-info-description").html(
        "<p><strong>Plate: </strong><span>" +
        itemData.info.plate +
        "</span></p><p><strong>Model: </strong><span>" +
        itemData.info.description +
        "</span></p>"
    );
} else if (itemData.name == "plate") {
    $(".item-info-title").html("<p>" + itemData.label + "</p>");
    $(".item-info-description").html(
        "<p><strong>Plate: </strong><span>" +
        itemData.info.plate +
        "</span></p>"
    );
Items for qb-inventory
vehiclekeys 				 = {["name"] = "vehiclekeys", 					["label"] = "Vehicle Keys", 			["weight"] = 50, 		["type"] = "item", 		["image"] = "vehiclekeys.png", 			["unique"] = true, 		["useable"] = true, 	["shouldClose"] = true,    ["combinable"] = nil,  ["description"] = "A small and sweet casting."},
plate				 	 = {["name"] = "plate", 					["label"] = "Plate", 				["weight"] = 50, 		["type"] = "item", 		["image"] = "plate.png", 			["unique"] = true, 		["useable"] = true, 	["shouldClose"] = true,    ["combinable"] = nil,  ["description"] = "A plate."},
carlockpick 				 = {["name"] = "carlockpick", 					["label"] = "Carlockpick", 			["weight"] = 50, 		["type"] = "item", 		["image"] = "carlockpick.png", 			["unique"] = true, 		["useable"] = true, 	["shouldClose"] = true,    ["combinable"] = nil,  ["description"] = "A Lockpick."},
caradvancedlockpick 		         = {['name'] = 'caradvancedlockpick', 			        ['label'] = 'Car Advanced Lockpick',            ['weight'] = 500, 		['type'] = 'item', 		['image'] = 'advancedlockpick.png', 	        ['unique'] = false, 	        ['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,  ['description'] = 'If you lose your keys a lot this is very useful... Also useful to open your beers'},

You can add this snippet in qb-inventory/html/js/app.js to see the item information, but make sure it is not already added.

case "vehiclekeys":
            return `<p>${itemData.label}</p>
            <p><strong>Plate: </strong><span>${itemData.info.plate}</span></p>
            </span></p><p><strong>Model: </strong><span>${itemData.info.description}</span>;
case "plate":
            return `<p>${itemData.label}</p>
            <p><strong>Plate: </strong><span>${itemData.info.plate}</span></p>;
Items for ox_inventory
["vehiclekeys"] = {
	label = "Keys",
	weight = 1,
	stack = false,
	close = false,
	consume = 0,
	client = {
		export = 'qs-vehiclekeys.useKey',
	},
},

['plate'] = {
	label = 'Plate',
	weight = 100,
	stack = true,
	close = false,
	consume = 0,
	client = {
		export = 'qs-vehiclekeys.usePlate',
	},
},

['carlockpick'] = {
	label = 'Car Lockpick',
	weight = 100,
	stack = true,
	close = false,
	description = "Plate for vehicle",
	client = {
		export = 'qs-vehiclekeys.useCarlockpick',
	},
},

['caradvancedlockpick'] = {
	label = 'Advanced Lockpick',
	weight = 100,
	stack = true,
	close = false,
	description = "Plate for vehicle",
	client = {
		export = 'qs-vehiclekeys.useAdvancedCarlockpick',
	},
},
Items for core_inventory

Add this on core_inventory/config.lua on ItemCategories.

["vehiclekeys"] = {
    color = "#62a859",
    takeSound = 'take_fabric',
    putSound = 'put_fabric',
},

Helper codes

You can divide the prints by commas so you don't have to write more, you can print values ​​but also letters.

You can use this option if you know what you are doing and you have basic knowledge, this is just a tip to help you if you are having a little difficulty.

Many times you should help yourself with the prints(), these are tools to see the values ​​of each variable, for example sometimes it is confusing or you do not know where you are wrong, you can put several prints and see which is the correct value for example.

print(vehicleData.model, vehicleData.name, vehicleData.other) -- Example

print('Model : ', vehicleData.model) -- Example

ESX.TriggerServerCallback('esx_vehicleshop:buyVehicle', function(success)
	if success then
		IsInShopMenu = false
		menu2.close()
		menu.close()
		DeleteDisplayVehicleInsideShop()
		FreezeEntityPosition(playerPed, false)
		SetEntityVisible(playerPed, true)
		-- And you can go try until you have the values ​​you need
		print(vehicleData.model, vehicleData.name, vehicleData.other)
	else
		ESX.ShowNotification(TranslateCap('not_enough_money'))
	end
end, vehicleData.model, generatedPlate)

Get model and plate natively

This is a simple copy and paste code to integrate it into your code to obtain the plate.

local model = GetDisplayNameFromVehicleModel(GetEntityModel(veh))
local plate = GetVehicleNumberPlateText(veh)

Basic asset configuration

We do not recommend editing frameworks unnecessarily, since almost all assets depend exclusively on your framework and exports on the name of your framework. Otherwise and if you edited your framework, read these steps carefully.

If you still require more open codes for the configuration, you can check within client/custom and server/custom to adapt the asset to your personal taste.

Please expand each part to see information about the configuration of the asset, this way you will understand the general operation of the asset on the framework and editable files side.

Basic framework configuration

The asset will work automatically if your framework is called es_extended or qb-core, it will automatically detect if any of them are started. In case your framework has been renamed, you can modify it in config.lua to edit the name of your framework.

Advanced framework configuration

If your framework is completely modified, both in events and name, you should access client/custom/framework or server/custom/framework to adapt the native events of your framework to the codes you have created. If this step doesn't work, we ask that you ask your framework modifier or trusted developer for help.

More general settings

This asset contains multiple configurations within the config folder. But you can also access more open source and configurations within client/custom or server/custom. We do not recommend using these configurations if you do not have the basics of programming.

Last updated