Added a second set of binds for small keyboards

Also changed the key lock key to L, as the "switch binds" key is now K
This commit is contained in:
Dan
2020-02-25 14:23:31 +00:00
parent a3a1d93b3b
commit 5580cc8745
6 changed files with 136 additions and 42 deletions

View File

@@ -104,14 +104,14 @@ function READER:GetCamLocked( cam )
end
-- Locks the given reader
function READER:LockCam( cam, playAudio )
function READER:LockCam( cam, playAudio, isBolo )
-- Check that plate readers can actually be locked
if ( PLY:VehicleStateValid() and self:CanPerformMainTask() ) then
-- Toggle the lock state
self.vars.cams[cam].locked = not self.vars.cams[cam].locked
-- Tell the NUI side to show/hide the lock icon
SendNUIMessage( { _type = "lockPlate", cam = cam, state = self:GetCamLocked( cam ) } )
SendNUIMessage( { _type = "lockPlate", cam = cam, state = self:GetCamLocked( cam ), isBolo = isBolo } )
-- Play a beep
if ( self:GetCamLocked( cam ) ) then
@@ -199,7 +199,7 @@ function READER:Main()
-- Automatically lock the plate if the scanned plate matches the BOLO
if ( plate == self:GetBoloPlate() ) then
self:LockCam( cam, false )
self:LockCam( cam, false, true )
SendNUIMessage( { _type = "audio", name = "plate_hit", vol = RADAR:GetSettingValue( "plateAudio" ) } )
end