Open up the images folder and add the images to your inventory addon. For most people this will be called qb-inventory.
Drag and drop the images into the html/images folder.
Step 4 - Adding Vehicles
The vehicles used for the boosting system are configured by you. Each tier has a different set of vehicles, this means that you need to configure this in your qb-core vehicles.lua. This is so you have more control over what vehicles players will be boosting.
An example of a default vehicle is shown below
{ model ='blista', name ='Blista', brand ='Dinka', price =13000, category ='compacts', type ='automobile', shop ='pdm' },
Here is the modified vehicle, at the end you can see we added the tier part
{ model ='blista', name ='Blista', brand ='Dinka', price =13000, category ='compacts', type ='automobile', shop ='pdm', tier ='D' },
Then, add the bottom of your vehicles.lua file you should see something like this:
for i=1, #Vehicles do QBShared.Vehicles[Vehicles[i].model] = { spawncode = Vehicles[i].model, name = Vehicles[i].name, brand = Vehicles[i].brand, model = Vehicles[i].model, price = Vehicles[i].price, category = Vehicles[i].categoryLabel:gsub("%s+", ""):lower(), categoryLabel = Vehicles[i].categoryLabel, hash =joaat(Vehicles[i].model), shop = Vehicles[i].shop, }end
Change to:
for i=1, #Vehicles do QBShared.Vehicles[Vehicles[i].model] = { spawncode = Vehicles[i].model, name = Vehicles[i].name, brand = Vehicles[i].brand, model = Vehicles[i].model, price = Vehicles[i].price, category = Vehicles[i].categoryLabel:gsub("%s+", ""):lower(), categoryLabel = Vehicles[i].categoryLabel, hash =joaat(Vehicles[i].model), shop = Vehicles[i].shop, tier = Vehicles[i].tier, }end
The line tier = Vehicles[i].tier, must be added.
Step 5 - Database
Execute the following code in your database
CREATETABLE `car_boosting` (`id`int(11) NOT NULL,`citizenid`varchar(255) NOT NULL,`type`varchar(255) NOT NULL,`vehicle`varchar(255) NOT NULL,`value` double NOT NULL,`success`int(11) NOT NULL,`enemy_killed`int(11) NOT NULL,`timestamp`timestampNOT NULLDEFAULTcurrent_timestamp()) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;ALTERTABLE`car_boosting`ADDPRIMARY KEY (`id`);ALTERTABLE`car_boosting`MODIFY`id`int(11) NOT NULL AUTO_INCREMENT;CREATETABLE `car_boosting_messages` (`id`int(11) NOT NULL,`citizenid`varchar(255) NOT NULL,`message`varchar(255) NOT NULL,`timestamp`timestampNOT NULLDEFAULTcurrent_timestamp()) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;ALTERTABLE`car_boosting_messages`ADDPRIMARY KEY (`id`);ALTERTABLE`car_boosting_messages`MODIFY`id`int(11) NOT NULL AUTO_INCREMENT;ALTERTABLE player_vehicles ADD COLUMN vinnumber VARCHAR(50) DEFAULTNULL,ADD COLUMN vinscratch INT(2) DEFAULT0;
Step 6 - dpemotes Setup
You need to make a slight modification to the dpemotes resource to make the player animations work correctly.
In the resource, open up the file Client/Emote.lua , and look for the function called EmoteCommandStart
Right below the function, after the end , add in the following:
exports('EmoteCommandStart', EmoteCommandStart)
It should now look like the following:
functionEmoteCommandStart(source,args,raw)if#args >0thenlocal name =string.lower(args[1])if name =="c" thenif IsInAnimation thenEmoteCancel()elseEmoteChatMessage(Config.Languages[lang]['nocancel'])endreturnelseif name =="help" thenEmotesOnCommand()returnendif DP.Emotes[name] ~=nilthenifOnEmotePlay(DP.Emotes[name]) thenendreturnelseif DP.Dances[name] ~=nilthenifOnEmotePlay(DP.Dances[name]) thenendreturnelseif DP.PropEmotes[name] ~=nilthenifOnEmotePlay(DP.PropEmotes[name]) thenendreturnelseEmoteChatMessage("'"..name.."' "..Config.Languages[lang]['notvalidemote'].."")endendendexports('EmoteCommandStart', EmoteCommandStart)
Next, you need to open up the fxmanifest.lua file for dpemotes. At the bottom of the file, add in the following line:
export'EmoteCommandStart'
Step 7 - Configuration
The configuration file is setup with some locations already. Feel free to add more and tweak the rest to your likings.