diff --git a/resources/[carscripts]/sn_vehicleKey/client.lua b/resources/[carscripts]/sn_vehicleKey/client.lua index 06fd49d1d..a261f6985 100644 --- a/resources/[carscripts]/sn_vehicleKey/client.lua +++ b/resources/[carscripts]/sn_vehicleKey/client.lua @@ -105,12 +105,12 @@ Citizen.CreateThread(function() end -- lock vehicle with key - if (Config.lockKey and IsControlJustPressed(0, Config.lockKey)) then + --[[ if (Config.lockKey and IsControlJustPressed(0, Config.lockKey)) then local vehicle = GetClosestVehicle(GetEntityCoords(PlayerPedId()), 10.0) if (DoesEntityExist(vehicle) and IsVehicleOrKeyOwner(vehicle)) then ToggleLock(vehicle, GetVehicleDoorLockStatus(vehicle) ~= LockStatus.Locked) end - end + end ]] end end) @@ -799,3 +799,9 @@ local entityEnumerator = { end end, false) ]] + + +RegisterKeyMapping("vehicleLock", "Vehicle Lock", "keyboard", "PAGEUP") +RegisterCommand("vehicleLock", function() + TriggerEvent("VKC:toggleLockOnPlayer") +end, false) \ No newline at end of file