forked from Simnation/Main
Update client.lua
This commit is contained in:
parent
952890bd20
commit
721f0d3703
1 changed files with 8 additions and 2 deletions
|
@ -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)
|
Loading…
Add table
Add a link
Reference in a new issue