Previews:
Available Framework: QBCore
Credit: QBCore
Features:
You can’t lock your motorcycle, only engine start&stop.
Each vehicle has its own key.
You need to integration with your cardealer, I don’t support.
if your vehicle class is muscle, you need near your muscle vehicle it work with different animation.
REQ
- qb-core
- qb-inventory
- qb-taskbarskill (if you dont have GitHub - mb-later/qb-taskbarskill)
qb-inventory itemInfo:
Javascript
else if (itemData.name == "carkey") {
$(".item-info-title").html('<p>'+itemData.info.model+' Keys</p>')
$(".item-info-description").html('<p><strong>License Plate: </strong><span>' + itemData.info.plaka + '</span></p><p><strong></strong><span></span></p><p><strong>Model: </strong><span>' + itemData.info.model + '</span></p>');
}
GiveItem example:
Example
local info = {
model = veh,
plaka = plate
}
--Client: TriggerServerEvent("QBCore:Server:AddItem","carkey",1,false,info)
--{{Server}}
-- local xplayer = QBCore.Functions.GetPlayer(source)
-- if xplayer then
-- xplayer.Functions.AddItem("carkey", 1, false, info)
-- end
For the test, I printed the texts in the pictures, you will see the real values