Hey! I need help with qb-vehiclekeys , NPC’s cars are locked and I wanna make them unlocked. Can someone please help me
If you replace the function isBlacklistedVehicle in qb-vehiclekeys to always return true all local cars should be unlocked by default. If this doesn’t work then its mostlikely qb-smallresources manipulating the door locks of vehicles.
function isBlacklistedVehicle(vehicle)
local isBlacklisted = false
for _, v in ipairs(Config.NoLockVehicles) do
if GetHashKey(v) == GetEntityModel(vehicle) then
isBlacklisted = true
break
;end
end
if Entity(vehicle).state.ignoreLocks or GetVehicleClass(vehicle) == 13 then isBlacklisted = true end
--return isBlacklisted --this is how it normally is just do (you could also return true at the very top and save some computing power but its negligible so this would be fine)
return true
end
1 Like
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.