Vehicle Keys
If you're facing an issue where taxi doors unexpectedly close when players try to enter, it's likely due to the vehicle keys script on your server. This happens when the script forcefully locks NPC vehicles, unintentionally locking taxi doors as well.
We've already applied an inbuilt patch, but sometimes vehicle keys scripts override it. To fully resolve this, follow the steps below.
If you're using qb-vehiclekeys
and NPC vehicles are set to lock, follow these steps:
Open the
main.lua
file in theqb-vehiclekeys/client
folder.Go to line 58, and modify the file as shown below:
else -- > approx line 57
if not exports["eh_cutscene"]:isVehicleTaxi(entering) then
TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(entering), 1)
TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate)
--Make passengers flee
local pedsInVehicle = GetPedsInVehicle(entering)
for _, pedInVehicle in pairs(pedsInVehicle) do
if pedInVehicle ~= GetPedInVehicleSeat(entering, -1) then
MakePedFlee(pedInVehicle)
end
end
end
end

Last updated