Attempted workaround for control issues

This commit is contained in:
Dan
2020-04-26 16:20:17 +01:00
parent 74539874c3
commit 9de5694899
2 changed files with 52 additions and 48 deletions

View File

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

View File

@@ -31,14 +31,14 @@
---------------------------------------------------------------------------------------]]-- ---------------------------------------------------------------------------------------]]--
-- Define the FX Server version and game type -- Define the FX Server version and game type
fx_version "adamant" fx_version "bodacious"
game "gta5" game "gta5"
-- Define the resource metadata -- Define the resource metadata
name "Wraith ARS 2X" name "Wraith ARS 2X"
description "Police radar and plate reader system for FiveM" description "Police radar and plate reader system for FiveM"
author "WolfKnight" author "WolfKnight"
version "1.2.3" version "1.2.4"
-- Include the files -- Include the files
files { files {