Added config option for Sonoran CAD users

This commit is contained in:
Dan
2021-01-07 14:17:24 +00:00
parent 8658de39ad
commit 0fe8b24212
2 changed files with 8 additions and 2 deletions

View File

@@ -257,6 +257,8 @@ function READER:Main()
-- Send the plate information to the NUI side to update the UI -- Send the plate information to the NUI side to update the UI
SendNUIMessage( { _type = "changePlate", cam = cam, plate = plate, index = index } ) SendNUIMessage( { _type = "changePlate", cam = cam, plate = plate, index = index } )
-- If we use Sonoran CAD, reduce the plate events to just player's vehicle, otherwise life as normal
if ( ( CONFIG.use_sonorancad and ( UTIL:IsPlayerInVeh( veh ) or IsVehiclePreviouslyOwnedByPlayer( veh ) ) and GetVehicleClass( veh ) ~= 18 ) or not CONFIG.use_sonorancad ) then
-- Trigger the event so developers can hook into the scanner every time a plate is scanned -- Trigger the event so developers can hook into the scanner every time a plate is scanned
TriggerServerEvent( "wk:onPlateScanned", cam, plate, index ) TriggerServerEvent( "wk:onPlateScanned", cam, plate, index )
end end
@@ -265,6 +267,7 @@ function READER:Main()
end end
end end
end end
end
-- Main thread -- Main thread
Citizen.CreateThread( function() Citizen.CreateThread( function()

View File

@@ -59,6 +59,9 @@ CONFIG.allow_passenger_view = true
-- radar remote and control the radar and plate reader for themself and the driver. -- radar remote and control the radar and plate reader for themself and the driver.
CONFIG.allow_passenger_control = false CONFIG.allow_passenger_control = false
-- Set this to true if you use Sonoran CAD with the WraithV2 plugin
CONFIG.use_sonorancad = false
-- Sets the defaults of all keybinds -- Sets the defaults of all keybinds
-- These keybinds can be changed by each person in their GTA Settings->Keybinds->FiveM -- These keybinds can be changed by each person in their GTA Settings->Keybinds->FiveM
CONFIG.keyDefaults = CONFIG.keyDefaults =