#ox_doorlock Prevent car horn from going off when unlocking and locking doorlock

2 messages · Page 1 of 1 (latest)

misty moss
#
if ClosestDoor and ClosestDoor.distance < ClosestDoor.maxDistance then

            DisableControlAction(0, 86, true)

            if Config.DrawTextUI and not ClosestDoor.hideUi and ClosestDoor.state ~= showUI then
                lib.showTextUI(ClosestDoor.state == 0 and lockDoor or unlockDoor)
                showUI = ClosestDoor.state
            end

            local interact = IsDisabledControlJustReleased(0, 38)
            local horn = IsDisabledControlJustReleased(0, 86)

            if not PickingLock and (interact or horn) then
                useClosestDoor()
            end

starting at line 322 at if ClosestDoor and ClosestDoor.distance < ClosestDoor.maxDistance then in client/main.lua

misty moss
#

If anyone has a better way of doing this I would love to see what you guys think of this