For the complete documentation index, see llms.txt. This page is also available as Markdown.

garage

Vehicle Key

Use this change to give players keys when they take out a vehicle from Loaf Garage.

Update the browse file

Path: loaf_garage/client/browse.lua

Add this block after the function that sets vehicle properties.

Remove or comment out the default QBCore vehicle keys trigger.

if GetResourceState("ak47_vehiclekeys") == "started" then
    exports['ak47_vehiclekeys']:GiveKey(data.plate)
elseif GetResourceState("ak47_qb_vehiclekeys") == "started" then
    exports['ak47_qb_vehiclekeys']:GiveKey(data.plate)
end

This supports both versions:

  • ak47_vehiclekeys

  • ak47_qb_vehiclekeys

Example result

Use the screenshot below to confirm the final placement.

Last updated