Code consistency

This commit is contained in:
Dan
2020-03-28 17:52:53 +00:00
parent c59417eba7
commit bcb772514f
2 changed files with 24 additions and 26 deletions

View File

@@ -1774,53 +1774,51 @@ Citizen.CreateThread( function()
end
end )
-- Opens the remote control
RegisterCommand('radar_remote', function()
RegisterCommand( "radar_remote", function()
if ( not RADAR:GetKeyLockState() ) then
RADAR:OpenRemote()
end
end)
RegisterKeyMapping("radar_remote", "Open Radar Remote", "keyboard", CONFIG.keyDefaults.remote_control)
end )
RegisterKeyMapping( "radar_remote", "Open Remote Control", "keyboard", CONFIG.keyDefaults.remote_control )
-- Locks speed from front antenna
RegisterCommand('radar_fr_ant', function()
RegisterCommand( "radar_fr_ant", function()
if ( not RADAR:GetKeyLockState() ) then
RADAR:LockAntennaSpeed( "front" )
end
end)
RegisterKeyMapping("radar_fr_ant", "Front Antenna Lock", "keyboard", CONFIG.keyDefaults.front_lock)
end )
RegisterKeyMapping( "radar_fr_ant", "Front Antenna Lock/Unlock", "keyboard", CONFIG.keyDefaults.front_lock )
-- Locks speed from rear antenna
RegisterCommand('radar_bk_ant', function()
RegisterCommand( "radar_bk_ant", function()
if ( not RADAR:GetKeyLockState() ) then
RADAR:LockAntennaSpeed( "rear" )
end
end)
RegisterKeyMapping("radar_bk_ant", "Rear Antenna Lock", "keyboard", CONFIG.keyDefaults.rear_lock)
end )
RegisterKeyMapping( "radar_bk_ant", "Rear Antenna Lock/Unlock", "keyboard", CONFIG.keyDefaults.rear_lock )
-- Locks front plate reader
RegisterCommand('radar_fr_cam', function()
RegisterCommand( "radar_fr_cam", function()
if ( not RADAR:GetKeyLockState() ) then
READER:LockCam( "front", true, false )
end
end)
RegisterKeyMapping("radar_fr_cam", "Front Plate Reader Lock", "keyboard", CONFIG.keyDefaults.plate_front_lock)
end )
RegisterKeyMapping( "radar_fr_cam", "Front Plate Reader Lock/Unlock", "keyboard", CONFIG.keyDefaults.plate_front_lock )
-- Locks rear plate reader
RegisterCommand('radar_bk_cam', function()
RegisterCommand( "radar_bk_cam", function()
if ( not RADAR:GetKeyLockState() ) then
READER:LockCam( "rear", true, false )
end
end)
RegisterKeyMapping("radar_bk_cam", "Rear Plate Reader Lock", "keyboard", CONFIG.keyDefaults.plate_rear_lock)
end )
RegisterKeyMapping( "radar_bk_cam", "Rear Plate Reader Lock/Unlock", "keyboard", CONFIG.keyDefaults.plate_rear_lock )
-- Toggles the key lock state
RegisterCommand('radar_key_lock', function()
RegisterCommand( "radar_key_lock", function()
RADAR:ToggleKeyLock()
end)
RegisterKeyMapping("radar_key_lock", "Toggle Keybind Lock", "keyboard", CONFIG.keyDefaults.key_lock)
end )
RegisterKeyMapping( "radar_key_lock", "Toggle Keybind Lock", "keyboard", CONFIG.keyDefaults.key_lock )
-- Deletes all of the KVPs
RegisterCommand( "reset_radar_data", function()

View File

@@ -48,22 +48,22 @@ CONFIG.allow_quick_start_video = true
CONFIG.keyDefaults =
{
-- Remote control key
remote_control = 'f5',
remote_control = "f5",
-- Radar key lock key
key_lock = 'l',
key_lock = "l",
-- Radar front antenna lock/unlock Key
front_lock = 'numpad8',
front_lock = "numpad8",
-- Radar rear antenna lock/unlock Key
rear_lock = 'numpad5',
rear_lock = "numpad5",
-- Plate reader front lock/unlock Key
plate_front_lock = 'numpad9',
plate_front_lock = "numpad9",
-- Plate reader rear lock/unlock Key
plate_rear_lock = 'numpad6'
plate_rear_lock = "numpad6"
}
-- Here you can change the default values for the operator menu, do note, if any of these values are not