wasabi_bridge
Snippet example use case in wasabi_bridge.
Here is how to add MrNewbVehicleKeys compatibility to wasabi_bridge, keep in mind you will have to adjust config options in his scripts to make this work with it.
find this in wasabi_bridge/customize/client/carkeys.lua
-- Add car keys
function WSB.giveCarKeys(plate, _model, _vehicle)
print(GetResourceState('wasabi_carlock'))
if GetResourceState('wasabi_carlock') == 'started' then
return exports.wasabi_carlock:GiveKey(plate) -- Leave like this if using wasabi_carlock
end
if GetResourceState('qb-vehiclekeys') == 'started' then
return TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate)
end
end
function WSB.removeCarKeys(plate, _model, _vehicle)
if GetResourceState('wasabi_carlock') == 'started' then
return exports.wasabi_carlock:RemoveKey(plate)
end
end
Change it to this
-- Add car keys
function WSB.giveCarKeys(plate, _model, _vehicle)
if GetResourceState('wasabi_carlock') == 'started' then
return exports.wasabi_carlock:GiveKey(plate) -- Leave like this if using wasabi_carlock
end
if GetResourceState('MrNewbVehicleKeys') == 'started' then
return exports.MrNewbVehicleKeys:GiveKeysByPlate(plate)
end
if GetResourceState('qb-vehiclekeys') == 'started' then
return TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate)
end
end
function WSB.removeCarKeys(plate, _model, _vehicle)
if GetResourceState('wasabi_carlock') == 'started' then
return exports.wasabi_carlock:RemoveKey(plate)
end
if GetResourceState('MrNewbVehicleKeys') == 'started' then
return exports.MrNewbVehicleKeys:RemoveKeysByPlate(plate)
end
end
Last updated