diff --git a/cl_radar.lua b/cl_radar.lua index ff5a11e..c01f8fa 100644 --- a/cl_radar.lua +++ b/cl_radar.lua @@ -1776,55 +1776,59 @@ Citizen.CreateThread( function() end end ) --- Opens the remote control -RegisterCommand( "radar_remote", function() - if ( not RADAR:GetKeyLockState() ) then - RADAR:OpenRemote() - end -end ) -RegisterKeyMapping( "radar_remote", "Open Remote Control", "keyboard", CONFIG.keyDefaults.remote_control ) +Citizen.CreateThread( function() + Citizen.Wait( 3000 ) + + -- Opens the remote control + RegisterCommand( "radar_remote", function() + if ( not RADAR:GetKeyLockState() ) then + RADAR:OpenRemote() + end + end ) + RegisterKeyMapping( "radar_remote", "Open Remote Control", "keyboard", CONFIG.keyDefaults.remote_control ) --- Locks speed from front antenna -RegisterCommand( "radar_fr_ant", function() - if ( not RADAR:GetKeyLockState() ) then - RADAR:LockAntennaSpeed( "front" ) - end -end ) -RegisterKeyMapping( "radar_fr_ant", "Front Antenna Lock/Unlock", "keyboard", CONFIG.keyDefaults.front_lock ) + -- Locks speed from front antenna + RegisterCommand( "radar_fr_ant", function() + if ( not RADAR:GetKeyLockState() ) then + RADAR:LockAntennaSpeed( "front" ) + end + end ) + RegisterKeyMapping( "radar_fr_ant", "Front Antenna Lock/Unlock", "keyboard", CONFIG.keyDefaults.front_lock ) --- Locks speed from rear antenna -RegisterCommand( "radar_bk_ant", function() - if ( not RADAR:GetKeyLockState() ) then - RADAR:LockAntennaSpeed( "rear" ) - end -end ) -RegisterKeyMapping( "radar_bk_ant", "Rear Antenna Lock/Unlock", "keyboard", CONFIG.keyDefaults.rear_lock ) + -- Locks speed from rear antenna + RegisterCommand( "radar_bk_ant", function() + if ( not RADAR:GetKeyLockState() ) then + RADAR:LockAntennaSpeed( "rear" ) + end + end ) + RegisterKeyMapping( "radar_bk_ant", "Rear Antenna Lock/Unlock", "keyboard", CONFIG.keyDefaults.rear_lock ) --- Locks front plate reader -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/Unlock", "keyboard", CONFIG.keyDefaults.plate_front_lock ) + -- Locks front plate reader + 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/Unlock", "keyboard", CONFIG.keyDefaults.plate_front_lock ) --- Locks rear plate reader -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/Unlock", "keyboard", CONFIG.keyDefaults.plate_rear_lock ) + -- Locks rear plate reader + 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/Unlock", "keyboard", CONFIG.keyDefaults.plate_rear_lock ) --- Toggles the key lock state -RegisterCommand( "radar_key_lock", function() - RADAR:ToggleKeyLock() -end ) -RegisterKeyMapping( "radar_key_lock", "Toggle Keybind Lock", "keyboard", CONFIG.keyDefaults.key_lock ) + -- Toggles the key lock state + RegisterCommand( "radar_key_lock", function() + RADAR:ToggleKeyLock() + end ) + RegisterKeyMapping( "radar_key_lock", "Toggle Keybind Lock", "keyboard", CONFIG.keyDefaults.key_lock ) --- Deletes all of the KVPs -RegisterCommand( "reset_radar_data", function() - DeleteResourceKvp( "wk_wars2x_ui_data" ) - DeleteResourceKvp( "wk_wars2x_om_data" ) - DeleteResourceKvp( "wk_wars2x_new_user" ) -end, false ) \ No newline at end of file + -- Deletes all of the KVPs + RegisterCommand( "reset_radar_data", function() + DeleteResourceKvp( "wk_wars2x_ui_data" ) + DeleteResourceKvp( "wk_wars2x_om_data" ) + DeleteResourceKvp( "wk_wars2x_new_user" ) + end, false ) +end ) \ No newline at end of file diff --git a/fxmanifest.lua b/fxmanifest.lua index ce31add..dd7d014 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -31,14 +31,14 @@ ---------------------------------------------------------------------------------------]]-- -- Define the FX Server version and game type -fx_version "adamant" +fx_version "bodacious" game "gta5" -- Define the resource metadata name "Wraith ARS 2X" description "Police radar and plate reader system for FiveM" author "WolfKnight" -version "1.2.3" +version "1.2.4" -- Include the files files {