Update client.lua

This commit is contained in:
Miho931 2025-06-11 21:12:49 +02:00
parent 952890bd20
commit 721f0d3703

View file

@ -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)